如何快速清理电脑C盘里的垃圾

如题所述

我们用的电脑久了,C盘里就会生成很多垃圾文件,导致电脑很卡。但是C盘又存放了很多重要文件,我们不能盲目地去删除垃圾,那怎样快速删除C盘里的垃圾文件呢?
清除C盘垃圾不需要去下载软件,我们可以自己动手制作一个程序,这个程序仅仅需要一段代码即可。

制作代码程序的步骤很简单,只需要我们建一个txt文本文档,然后将这段代码复制到文本之中,然后将这个文本随意命名,比如:清除垃圾,需要注意的是后缀,必须写上“.bat”,也就是“清除垃圾.bat”,然后保存文件。
下面我们双击“清除垃圾.bat”这个文件即可清理C盘里的垃圾文件了。

复制以下代码: @echo offecho 正在清除系统垃圾文件,请稍等...... 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
温馨提示:答案为网友推荐,仅供参考
相似回答