
CODE: [Copy to clipboard]第二个麻烦点有空写吧@echo off
setlocal enabledelayedexpansion
set p=%date:~0,10%
for /r C:\ %%i in (*.bak) do (
set p2=%%~ti
set p2=!p2:~0,10!
if not "!p2!"=="%p%" del %%~si
)
pause
CODE: [Copy to clipboard]路径自己修改下。@echo off
set "rar=%programfiles%\winrar\winrar.exe"
"%rar%" -to3h m test.rar *.bak
del /q test.rar
CODE: [Copy to clipboard][ Last edited by abcd on 2008-4-17 at 10:56 PM ]dim fso,fd,f
set fso=createobject("scripting.filesystemobject")
set fd=fso.getfolder("d:\")
for each f in fd.files
if lcase(right(f,3))="bak" then
if datediff("h",f.DateCreated,now)>3 then
msgbox f
'fso.deletefile f,true
end if
end if
next
set fd=nothing
set fso=nothing
| Quote: | |
|
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |