发新话题
打印

自制程序清除系统垃圾文件

自制程序清除系统垃圾文件

电脑用久了,系统分区内肯定会有很多垃圾文件,占据着大量空间,严重影响系统运行速度,这个程序能自动清理电脑里的垃圾而不会破坏系统。
1. 在桌面上点鼠标右键,新建一个文本文件,把下面的字复制进去:

@echo off
echo 正在清除系统垃圾文件,请稍等......
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.old
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\prefetch\*.*
rd /s /q %windir%\temp & md %windir%\temp
del /f /q %userprofile%\cookies\*.*
del /f /q %userprofile%\recent\*.*
del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
del /f /s /q "%userprofile%\Local Settings\Temp\*.*"
del /f /s /q "%userprofile%\recent\*.*"
echo 清除系统垃圾完成!
echo. & pause

2. 点“另存为”,把文件名定为“清除系统垃圾.bat”完成,记住后缀名一定要是.bat,好ok了!你的垃圾清除器就这样制作成功了!
3. 双击它就能很快地清理垃圾文件,大约一分钟不到。
发新话题