我是VB Script的新手,我需要VB脚本根据文件夹名称结构移动特定的子文件夹(即从“test2”中拾取精确的“abc”子文件夹并需要移动“test1”)和文件夹的确切结构如下
在上面,“html”文件夹不包含任何“abc”子文件夹
我想在“abc”子文件夹下移动到“html”文件夹
之上任何人都可以帮忙
提前致谢
答案 0 :(得分:0)
基于this answer to your "delete folder" question:
只需提供以下方法:
Public Function processFolder(oFolder)
WScript.Echo "looking at", oFolder.Path
processFolder = True
If "abc" = oFolder.Name Then
WScript.Echo "will move", oFolder.Path
WScript.Echo " to", Replace(oFolder.Path, "\df\", "\mf\")
oFolder.Move Replace(oFolder.Path, "\df\", "\mf\")
processFolder = False
End If
End Function