windows系统C盘清理命令bat文件,批处理文件
2022-11-16 15:21:27
230
bat
cmd批处理
电脑在长时间使用后会生成很多临时文件和系统垃圾,此时如果不定期清理,会占用不少系统内存,使系统越来越卡,反应速度越来越慢。
这里推荐一种快速清理C盘的方法,通过windows 批处理命令自动清理。**复制以下命令:**
```cmd
@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
```
2. 在电脑桌面新建一个记事本文件(如:C盘清理.txt),然后将复制的**命令**粘贴到记事本里,保存并关闭文件。
3. 鼠标右键,将记事本后缀从“txt”修改为“bat”。
4. 鼠标左键双击(C盘清理.bat),双击运行。
5. 等待清理脚本执行完成,done