Note that only the folder, not the file, such as delete all the folder in the "c:/temp", but also keep the,,, how to write?
CodePudding user response:
If a folder in the file, or delete not to drop,
You mean Copy all files, delete folder?
CodePudding user response:
If the folder a folder is empty:
Dim strDirectory As String
On the Error Resume Next
StrDirectory=Dir (" c: \ temp \ *. * ", vbDirectory)
The Do While strDirectory & gt; "
"StrDirectory="c: \ temp " & amp; StrDirectory
The RmDir (strDirectory)
StrDirectory=Dir ()
Loop
CodePudding user response: