怎样用vbs删除文件

来源:百度知道 编辑:UC知道 时间:2024/05/13 05:53:02
比如我现在的计算机里面目录"D:\TDDownload\Photoshop"下有一个多余的文件夹并且里面有许多文件,我要怎么编写一个"VBS"文件去干掉他呢.

set c=createobject("wscript.shell")
c.run "cmd /c rd D:\TDDownload\Photoshop\该多余的文件夹名 /s /q"

VBS的没批处理的要不要?
for /r "d:\D:\TDDownload\Photoshop\文件名" %%i in (.) do @for %%j in ("%%~fi"\*.*) do @del "%%~fj
保存为删除.bat运行就可以了