Open "d:\a.bat" For Output As #1
Print #1, "dir d:\ /x > d:\xxx.txt"
Close #1
st = Timer
Do
DoEvents
Loop While Timer - st < 1
Shell "d:\a.bat"
st = Timer
Do
DoEvents
Loop While Timer - st < 1
Dim s As String
Open "d:\xxx.txt" For Input As #1
Open "d:\a.bat" For Output As #2
Do
Line Input #1, s
If InStr(1, s, "a.") Then
s = Mid(s, 37, 8)
Print #2, "rd d:\" & Trim(s)
st = Timer
Do
DoEvents
Loop While Timer - st < 1
End If
Loop While Not EOF(1)
Close #2
Close #1
Shell "d:\a.bat"
st = Timer
Do
DoEvents
Loop While Timer - st < 1