请问一下有个创建一个文本文件,然后重名为.BAT的后缀,这个清楚系统垃圾真的有用么?

来源:百度知道 编辑:UC知道 时间:2024/06/06 19:25:25
@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

.bat是批处理文件后缀名。可以用文本程序编辑,以上代码可以清除系统垃圾,主要是一些系统临时缓存文件,IE缓存文件,还有其它软件的一些临时文件及历史文件等等,如果想对这段代码有更多了解,我可以把教程发给你。