主页 > 知识库 > 清除垃圾的VBS文件 自动查找多个盘

清除垃圾的VBS文件 自动查找多个盘

热门标签:加盟电销机器人好的品牌 海外美发店地图标注 百度地图标注怎么卸载 外呼营销下单系统 打电话的外呼系统贵不贵 陕西高频外呼回拨系统哪家好 新密防封卡外呼系统违法吗 前锋办理400电话申请 办理胶州400电话财税
复制代码 代码如下:

rem made by correy
rem made at 2007.9.22
rem it can be delete you computer's the follow things(except cd,dvd)
rem it can be delete empty file and folder
rem it can be delete .tmp ._mp .log .gid .chk .old file
rem it can be delete temp,recent,cookis,recycled,prefetch,and "Temporary Internet Files" folder.
rem i am thinking how to delete the same size and same name's file and folder

On Error GoTo 0
Set fso = CreateObject("Scripting"".""FileSystem""Object")

for n = 1 to 3
For Each d in fso.Drives
if d.drivetype=4 then
Exit For
else
scan(d)
end if
next
next

sub scan(folder)
on error resume next
set folder=fso.getfolder(folder)
for each file in folder.files
if file.size=0 then
file.delete(true)
end if

ext=fso.GetExtensionName(file)
ext=lcase(ext)
if ext="tmp" or ext="_mp" or ext="log" or ext="gid" or ext="chk" or ext="old" then ''30
file.delete(true)
end if
next
for each subfolder in folder.subfolders

rem instrRev() can't be used,i want to find "\".
if left(subfolder.path,4)="temp" or left(subfolder.path,8)="recycled" then
subfolder.delete(true)
elseif left(subfolder.path,6)="recent" or left(subfolder.path,7)="cookis" then
subfolder.delete(true) rem 40
elseif left(subfolder.path,24)="Temporary Internet Files" or left(subfolder.path,8)="prefetch" then
subfolder.delete(true)
end if

if subfolder.size=0 then subfolder.delete(true)
scan(subfolder)
next
end sub

标签:四平 伊春 牡丹江 梅州 武威 咸阳 河南 阜阳

巨人网络通讯声明:本文标题《清除垃圾的VBS文件 自动查找多个盘》,本文关键词  清除,垃圾,的,VBS,文件,自动,;如发现本文内容存在版权问题,烦请提供相关信息告之我们,我们将及时沟通与处理。本站内容系统采集于网络,涉及言论、版权与本站无关。
  • 相关文章
  • 下面列出与本文章《清除垃圾的VBS文件 自动查找多个盘》相关的同类信息!
  • 本页收集关于清除垃圾的VBS文件 自动查找多个盘的相关信息资讯供网民参考!
  • 推荐文章