ven00m, эта строка явно не к месту:
Цитата ven00m:
If File.Name = "$*" Or File.Name = "Thumbs.db" Or File.Name = "*.TMP" Then
|
Так работает:
Код:
Set FSO = CreateObject("Scripting.FileSystemObject")
Set F = FSO.GetFolder("c:\test\") ' Начальный каталог
Cleaner F
Sub Cleaner(Folder)
On Error Resume Next
FSO.DeleteFile Folder.Path + "\$*", True
FSO.DeleteFile Folder.Path + "\Thumbs.db", True
FSO.DeleteFile Folder.Path + "\*.TMP", True
For Each subFolder in Folder.SubFolders
Cleaner subFolder
Next
End Sub