如何清除系统垃圾文件?

来源:互联网 发布:青岛科技大数据平台 编辑:程序博客网 时间:2024/05/01 19:38

系统用久了后,会产生许多临时文件,皆垃圾也。

如何清除?

用批处理文件。把以下内容复制到记事本

 

@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 清除系统LJ完成!
echo. & pause

 

另存为清除系统垃圾.bat(文件名)

选择所有文件选项(保存类型)

我的删除了有300M左右。