时间:2021-05-22
复制代码 代码如下:
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
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
利用vbscript脚本修改文件内容,此适用于自动化的操作中'新建一个Replace.vbs脚本,脚本内容如下,程序运行时输入三个参数:查找内容,替换内容,文件
centos7系统中tmp目录下有很多垃圾,想要清除垃圾,该怎么清除呢?下面我们就来看看详细的教程。查看tmp文件目录下文件列表,执行命令cdtmp/切换到tm
清除c盘中不需要的文件的方法如下: 1、右击C盘,选择属性。 2、在属性窗口中点击“磁盘清理”,系统自动对系统缓存、浏览器缓存、回收站文件等进行扫描。 3
VBS肿么获取某目录下的文件列表dimFileName,fs,foldernamefoldername=InputBox("请输入想要在哪个文件夹查找","VB
内存中不可达对象(没有引用指向此对象)会被标记为垃圾对象手动将对象变为垃圾对象:将指向对象的变量置为null如何GC:查找,标记,清除,整理控制台查看是否启动G