Private Sub Command1_Click()
Dim d As String, s As String
d = Dir("d:\yule\*.*") '这里是D盘,你可以改成其他盘
Open "d:\tu.txt" For Append As #1
Do Until d = ""
s = LCase(Right(d, 4))
If s = ".jpg" Or s = ".png" Or s = "jpeg" Then Print #1, d
d = Dir
Loop
Close #1
MsgBox "运行完毕!"
End Sub
可以这样:
Private Sub Command1_Click()
Shell ("cmd.exe /c dir \yule>\tu.txt")
End Sub
或:
Private Sub Command1_Click()
Shell ("cmd.exe /c dir \yule /b >\tu.txt")
End Sub
填写一张建行信用卡申请表