Dim the path and filename, folders (1 To 20000)
Dim I %, j %
I=1
J=1
Path=folder
Folders (1)=path
The Do While I & lt;=j
Filename=Dir (folders (I), vbDirectory)
Do Until filename=""
If InStr (filename, "")=0 Then
J=j + 1
Folders (j)=folders (I) & amp; Filename & amp; ""
List1. AddItem filename
End the If
Filename=Dir
Loop
I=I + 1
Loop
CodePudding user response:
Traverse the file name, all file names including the subfolders, make old error for a long time, the current traversal folder name hasn't set,CodePudding user response:
Consult ace has been given to the train of thought to solve itself, by ", "judge whether who invented for folders, not rigorous
Fso. FolderExists (folders (I) & amp; Filename)=True
CodePudding user response:
Under the Windows system:Folder name can be "a bit";
File name can be "does not have some" (that is, "no extension"),
According to whether or not to judge whether is "a bit" is inherently unreliable!

The real "bottom" according to judging whether there is a "folder properties" logo,
CodePudding user response: