1
我需要開發donwload所有文件大小等於0,從驅動器C.我已經做了的VBScript腳本如下:如何讓遞歸下載所有空文件的腳本?
Dim oFSO
Dim sDirectoryPath
Dim oFolder
Dim oFileCollection
Dim oFile
Dim oFolderCollection
Dim n
Set oFSO = CreateObject("Scripting.FileSystemObject")
sDirectoryPath = "C:\"
set oFolder = oFSO.GetFolder(sDirectoryPath)
set oFolderCollection = oFolder.SubFolders
set oFileCollection = oFolder.Files
For each oFile in oFileCollection
IF oFile.Size = 0 Then
oFile.Delete(true)
END IF
Next
但是這個劇本只從C盤的根目錄下刪除文件!我需要在此代碼中使用recusrive,但我是VBScript中的新成員,並且不知道如何執行此操作。請,我希望你能幫助我。謝謝。
什麼是這樣的:http://www.wisesoft.co.uk/scripts/vbscript_recursive_file_delete_by_extension.aspx – HK1