BAT加快电脑运行速度
1、编写脚本第一步:首先,先新建一个记事本,

2、编写脚本第二步:向记事本中输入代码
以下为一键清理垃圾代码
============这行不需要输入========================
echo.执行清理垃圾,加快运行速度
echo.按任意键开始清理&pause>nul
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>nul
exit
============这行不需要输入联近墨========================

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


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


5、会不会觉得颜色过于单调???
更改标题
我们可以在@echo off下另起一行为color 0a
==========代码如下,本行不用输入======================
echo.执行清理垃圾,加快运行速度
color0a&title一键清理系统垃圾
echo.按任意键开始清理&pause>nul
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>nul
exit
==========代码如上,本行不用输入======================
是不是好看多了

6、如果还觉麻烦,懒到不想动了,懒到家了,我们可以把它加入开机脚本中或启动项中,让它开机囊此自己运行,
加入开机脚本:按win键+r键打开运行窗口(也可以在开始菜单中打开),输入gpedit.msc
开机后批处理就会自己运行了




