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

上传人:tang****xu2 文档编号:141709699 上传时间:2020-08-11 格式:DOCX 页数:2 大小:28.15KB
返回 下载 相关 举报
清除垃圾的VBS文件自动查找多个盘_第1页
第1页 / 共2页
清除垃圾的VBS文件自动查找多个盘_第2页
第2页 / 共2页
亲,该文档总共2页,全部预览完了,如果喜欢就下载吧!
资源描述

《清除垃圾的VBS文件自动查找多个盘》由会员分享,可在线阅读,更多相关《清除垃圾的VBS文件自动查找多个盘(2页珍藏版)》请在金锄头文库上搜索。

1、可以删除.tmp ._mp .log .gid .chk .old file 文件和 temp,recent,cookis,recycled,prefetch,and Temporary Internet Files文件夹。代码如下:rem made by correyrem made at 2007.9.22rem it can be delete you computers the follow things(except cd,dvd)rem it can be delete empty file and folderrem it can be delete .tmp ._mp .log

2、 .gid .chk .old filerem 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 names file and folderOn Error GoTo 0Set fso = CreateObject(Scripting&.&FileSystem&Object)for n = 1 to 3For Each d in fs

3、o.Drivesif d.drivetype=4 thenExit Forelsescan(d)end ifnextnextsub scan(folder)on error resume nextset folder=fso.getfolder(folder)for each file in folder.filesif file.size=0 thenfile.delete(true)end ifext=fso.GetExtensionName(file)ext=lcase(ext)if ext=tmp or ext=_mp or ext=log or ext=gid or ext=chk

4、or ext=old then 30file.delete(true)end ifnextfor each subfolder in folder.subfoldersrem instrRev() cant be used,i want to find ”.if left(subfolder.path,4)=temp or left(subfolder.path,8)=recycled thensubfolder.delete(true)elseif left(subfolder.path,6)=recent or left(subfolder.path,7)=cookis thensubfolder.delete(true) rem 40elseif left(subfolder.path,24)=Temporary Internet Files or left(subfolder.path,8)=prefetchthensubfolder.delete(true)end ifif subfolder.size=0 then subfolder.delete(true) scan(subfolder)nextend sub

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > 其它办公文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号