
- 帖子
- 3
- 积分
- 17
- 技术
- 1
- 捐助
- 0
- 注册时间
- 2013-2-18
|
我用第三个,win7系统下,也是不行啊,求指导
D:\test>批删文件夹.bat
D:\test>rem 指定待删除文件夹的存放路径
D:\test>set SrcDir=D:\test
D:\test>rem 指定天数
D:\test>set DaysAgo=1
D:\test>echo Set WshShell = WScript.CreateObject("WScript.Shell") 1>"C:\Users\ADMINI~1\AppData\Local\Temp\BackupDate.vbs"
D:\test>echo WScript.Echo WshShell.RegRead ("HKEY_CURRENT_USER\Control Panel\International\sShortDate") 1>>"C:\Users\ADMINI~1\AppData\Local\Temp\BackupDate.vbs"
D:\test>for /F %a in ('cscript /nologo "C:\Users\ADMINI~1\AppData\Local\Temp\BackupDate.vbs"') do (set "RegDateOld=%a" )
D:\test>(set "RegDateOld=yyyy-M-d" )
D:\test>echo Set WshShell = WScript.CreateObject("WScript.Shell") 1>"C:\Users\ADMINI~1\AppData\Local\Temp\UnifyDate.vbs"
D:\test>echo WshShell.RegWrite "HKEY_CURRENT_USER\Control Panel\International\sShortDate", "yyyy-M-d", "REG_SZ" 1>>"C:\Users\ADMINI~1\AppData\Local\Temp\UnifyDate.vbs"
D:\test>cscript /nologo "C:\Users\ADMINI~1\AppData\Local\Temp\UnifyDate.vbs"
D:\test>echo LastDate=date()-1 1>"C:\Users\ADMINI~1\AppData\Local\Temp\DstDate.vbs"
D:\test>echo FmtDate=right(year(LastDate),4) & right("0" & month(LastDate),2) & right("0" & day(LastDate),2) 1>>"C:\Users\ADMINI~1\AppData\Local\Temp\DstDate.vbs"
D:\test>echo wscript.echo FmtDate 1>>"C:\Users\ADMINI~1\AppData\Local\Temp\DstDate.vbs"
D:\test>for /F %a in ('cscript /nologo "C:\Users\ADMINI~1\AppData\Local\Temp\DstDate.vbs"') do (set "DstDate=%a" )
D:\test>(set "DstDate=20130217" )
D:\test>set DstDate=2013-02-17
命令语法不正确。
D:\test> if exist "%a\"
D:\test> |
|