Windows一键清除垃圾bat
Windows一键清除垃圾bat
1.首先在桌面上创建一个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
2.点击文件另存为
![Windows一键清除垃圾bat-2152](https://www.zoneidc.com/uploads/image/20230406/16807521515168729.png)
3.文件名后缀改成bat,保存类型选择为所有文件。然后保存,在保存目录下会看到如图的文件。
![Windows一键清除垃圾bat-2153](https://www.zoneidc.com/uploads/image/20230406/16807521582002469.png)
4.右键以管理员身份运行,图片仅截图一部分。
![Windows一键清除垃圾bat-2154](https://www.zoneidc.com/uploads/image/20230406/16807521639281462.png)
最后等待提示按任意键后清理完成。