如何自制简单的清理电脑系统垃圾的脚本
很多朋友不懂得如何清理自己电脑上产生的各种垃圾文件,导致电脑越来越卡,下面就让小编教大家如何自制简单的清理电脑系统垃圾的脚本吧。
自制清理垃圾脚本的方法
在桌面上右键然后选择新建一个文本文档。

打开记事本,在文本文档中输入以下代码
@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 SettingsTemporary Internet Files*.*"
del /f /s /q "%userprofile%Local SettingsTemp*.*"
del /f /s /q "%userprofile%recent*.*"
echo 清除系统垃圾完成!
echo. & pause

在记事本左上角的文件里选择另存为。

将文本文档的后缀.txt改为.bat,把保存类型改为所有文件。

保存完毕后直接点击它就可以开始清理电脑垃圾了。

清理完毕后,在键盘上任意按一个键,就退出清理界面了。

猜你感兴趣的:
1.电脑系统垃圾如何清除干净
2.如何清理电脑系统垃圾
3.怎么解决电脑变卡了 怎么清理电脑垃圾
4.如何清理电脑垃圾提高系统流畅度
5.怎样清理win7电脑系统的垃圾