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