本帖最后由 pcl_test 于 2015-8-22 23:30 编辑
- Set fso = CreateObject("Scripting.FileSystemObject")
- parentfolder = fso.GetParentFolderName(WScript.ScriptFullName)
-
- Function GetSubFolders(parentfolder)
- Set currentFolder = fso.GetFolder(parentfolder)
- For i=1 to 9
- If (fso.FileExists(currentFolder&"\幻灯片"&i&".jpg")) Then
- fso.movefile currentFolder&"\幻灯片"&i&".jpg",currentFolder&"\幻灯片0"&i&".jpg"
- End If
- Next
- '以下四句递归遍历子文件夹,如果不包括子文件夹去掉即可
- Set subFolderSet = currentFolder.SubFolders
- For Each subFolder in subFolderSet
- GetSubFolders(subFolder.Path)
- Next
- End Function
-
- Call GetSubFolders(parentfolder)
复制代码
|