c盘垃圾清理磁盘清理 清理系统垃圾.bat
广告:
1 c盘垃圾清理磁盘清理 cleanmgr
2 DISM 命令行(微软官方底层工具)
管理员 CMD 执行,适合脚本批量自动清理:
DISM /Online /Cleanup-Image /StartComponentCleanup
DISM /Online /Cleanup-Image /SPSuperseded
DISM /Online /Cleanup-Image /StartComponentCleanup 基础安全清理,保留最近一次更新的回滚备份,清理老旧冗余文件,风险极低,日常推荐
DISM /Online /Cleanup-Image /SPSuperseded 专门清理被新版本更新替代的服务包 / 累积更新备份文件,比单纯 StartComponentCleanup 清理力度更大,主要针对叠加更新产生的冗余旧补丁备份。 重叠、重复存放的系统更新缓存,大幅减小 C:\Windows\WinSxS 体积
专门清理 WinSxS 冗余组件,无任何第三方程序,适合定时计划任务自动清理
3 深度清理 C 盘、WinSxS、更新补丁
Dism++(首选)
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%\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 清除系统LJ完成!
echo. & pause
广告:


