My purpose is used to read these regular take the character inside the HTM file.
Is there any way to make it a one-time finish all traversal enumeration? Thank you very much!
strfile=Dir (App) Path & amp; "\ *. HTM")
Do Until strfile=""
The Open strfile For Input As # 7
While Not EOF (7) 'EOF function for the end test
The Line Input # 7, s' read and placed in a temporary string
Wend
Close # 7
.
Strfile=Dir
Loop
MsgBox "finished"
CodePudding user response:
Try to open the code read a file note off, is to determine what went wrong,strfile=Dir (App) Path & amp; "\ *. HTM")
Do Until strfile=""
'Open strfile For Input As # 7
'While Not EOF (7) EOF function for the end test
'Line Input the # 7, s read and placed in a temporary string
'Wend
'Close # 7
'...
The Debug. Print strfile
Strfile=Dir
Loop
MsgBox "finished"
CodePudding user response:
No judgment. "" and".. ", may be a problem.Try this encapsulated module I see:
http://www.m5home.com/bbs/thread-2218-1-1.html
After the call is very simple, add module:
'search for files module testing process'BY widely spread-and deeply felt the old
'amethyst studio
'
http://www.m5home.com/Dim I () As String, J As Long
I=SearchFileInPath (" c: \ Windows \ web ", "*. *)
For J=0 To UBound (I)
The Debug. Print the I (J) 'Print all files
Next