目录
1.软件清理
可选软件:
- 磁盘分析-spacesniffer
- 垃圾清理-ccleaner
- 重复文件清理-Duplicate Cleaner
- 系统优化-dism++
- 分区助手
参考网址:https://www.zhihu.com/question/27284451
2.手动清理
3.代码bat清理
@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
将上段代码复制到记事本中,并将记事本保存为ANSI编码的.bat文件,然后点击执行该bat文件
编码为ANSI是为了防止运行时cmd中乱码