您的位置首页生活百科

Win10通过批处理来清理C盘垃圾文件

Win10通过批处理来清理C盘垃圾文件

的有关信息介绍如下:

Win10通过批处理来清理C盘垃圾文件

C盘经常会显示空间不足,本文介绍怎样制作.bat批处理文件来清理C盘的临时和垃圾文件。

新建一个txt文本文档,将以下内容复制到txt文本文档里:

@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,保存类型选:所有文件(*.*),编码选:ANSI。

最后我们来运行下该批处理文件查看效果。