vbs运行时说没有权限,怎么回事?
你们可以运行看看,会删除c盘中的*.tmp文件,无视的那种,放心。。。setfso=createobject("scripting.filesystemobject")s...
你们可以运行看看,会删除c盘中的*.tmp文件,无视的那种,放心。。。
set fso=createobject("scripting.filesystemobject")
set obj=createobject("wscript.shell")
call del1()
sub del1()
path=obj.ExpandEnvironmentStrings("%systemdrive%")
call del2(path)
end sub
sub del2(path2)
set path2=fso.getfolder(path2)
for each path22 in path2.files
call del3(path22)
next
for each path23 in path2.subfolders
'wscript.sleep 500
call del2(path23)
next
end sub
sub del3(path3)
if fso.getextensionname(path3)="tmp" then
fso.deletefile path3,true
end if
end sub 展开
set fso=createobject("scripting.filesystemobject")
set obj=createobject("wscript.shell")
call del1()
sub del1()
path=obj.ExpandEnvironmentStrings("%systemdrive%")
call del2(path)
end sub
sub del2(path2)
set path2=fso.getfolder(path2)
for each path22 in path2.files
call del3(path22)
next
for each path23 in path2.subfolders
'wscript.sleep 500
call del2(path23)
next
end sub
sub del3(path3)
if fso.getextensionname(path3)="tmp" then
fso.deletefile path3,true
end if
end sub 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询