网络电话平台,生日礼物网站,大学生在线联盟
参考代码一:
for each subfolder in subfso
if datediff("d", subfolder.name, date)>3 then
strpath = dirpath&subfolder.name
objfso.deletefolder(strpath)
end if
next
end function
call deletelog( )
这样在task schdeuler里面schedule我的vbs程序就没有报错啦。撒花,结贴~~
参考代码二:
getfso=fso.getfolder("c:\\windows").datecreated
'===========================================================
function cprlql
dim strline, scml
wshshell.run "cmd /c dir " & wjml &" /ad /b /tc>c:\dir.log",0
if fso.fileexists("c:\dir.log") then
set objfile = fso.opentextfile("c:\dir.log")
do until objfile.atendofstream
strline = objfile.readline
scml = wjml & strline
wshshell.run "cmd /c rd /s /q " & scml,0
for i = 1 to 20
if fso.getdrive(datp).freespace > sykj then exit function
if fso.folderexists(scml) then
wscript.sleep(1000)
else
exit for
end if
next
if fso.getdrive(datp).freespace > sykj then exit function
loop
end if
end function
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
网友评论