联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
Originally posted by fzp1978321 at 2008-2-4 15:58: 但是我是把电脑时间调到2008-01-04做了几个文件,然后把电脑调到2008-01-11来删除,结果文件并没有被删除. 我上面照你代码改的,有没出错呢?是不是哪漏掉了?
@echo off regedit /e "%temp%\bak.reg" "HKEY_CURRENT_USER\Control Panel\International" >aDate.reg echo REGEDIT4 >>aDate.reg echo. >>aDate.reg echo [HKEY_CURRENT_USER\Control Panel\International] >>aDate.reg echo "sShortDate"="yyyy-MM-dd" >>aDate.reg echo "sDate"="-" >tmp.vbs echo Wscript.echo FormatDateTime (DateAdd("d",-7,Date),2) for /f "delims=" %%i in ('cscript.exe //nologo tmp.vbs') do set aDate=%%i del tmp.vbs "%ProgramFiles%\WinRAR\rar.exe" a -ep2 -df -r -tb%aDate% "xxx.rar" "xxx\*" regedit /s aDate.reg del aDate.reg pause