1、编写脚本第一步:首先,先新建一个记事本,

3、然后将文档另存为一键请理垃圾.bat(当然也可以自己命名,只要后缀为.bat就行)

4、编程完成后接下来我们来看看效果,bat会清理掉系统中的垃圾,及你使用的历史记录和产生的临时文件

5、会不会觉得颜色过于单调???更改标题我们可以在@echo off下另起一行为color 0a==========代码如下,本行不用输入==============租涫疼迟========echo.执行清理垃圾,加快运行速度color0a&title一键清理系统垃圾echo.按任意键开始清理&pause>nulecho 正在清除系統垃圾文件,請稍等......del /f /s /q %systemdrive%\*.tmpdel /f /s /q %systemdrive%\*._mpdel /f /s /q %systemdrive%\*.logdel /f /s /q %systemdrive%\*.giddel /f /s /q %systemdrive%\*.chkdel /f /s /q %systemdrive%\*.olddel /f /s /q %systemdrive%\recycled\*.*del /f /s /q %windir%\*.bakdel /f /s /q %windir%\prefetch\*.*rd /s /q %windir%\temp & md %windir%\tempdel /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>nulexit==========代码如上,本行不用输入======================是不是好看多了


