admin管理员组文章数量:1026989
@echo off
chcp 65001 >nul
echo 正在开始清理 C 盘,请稍候......
:: 删除临时文件
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.bak
:: 删除 Windows 日志文件
echo 正在删除 Windows 日志文件...
del /f /s /q %windir%\Logs\*
:: 清空回收站
echo 正在清空回收站...
rd /s /q %systemdrive%\$Recycle.Bin
:: 删除 Windows 更新文件
echo 正在删除 Windows 更新文件...
del /f /s /q %windir%\SoftwareDistribution\Download\*
:: 清空用户缓存和临时文件
echo 正在清空用户缓存和临时文件...
del /f /s /q "%userprofile%\AppData\Local\Temp\*"
del /f /s /q "%userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files\*"
del /f /s /q "%userprofile%\Cookies\*"
:: 删除不必要的文件
echo 正在删除不必要的文件...
del /f /s /q "%windir%\Temp\*"
del /f /s /q "%systemroot%\Prefetch\*"
:: 清理系统还原点
echo 正在清理系统还原点...
vssadmin delete shadows /for=c: /all /quiet
echo 清理完成!
pause
保存bat文件,双击使用
@echo off
chcp 65001 >nul
echo 正在开始清理 C 盘,请稍候......
:: 删除临时文件
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.bak
:: 删除 Windows 日志文件
echo 正在删除 Windows 日志文件...
del /f /s /q %windir%\Logs\*
:: 清空回收站
echo 正在清空回收站...
rd /s /q %systemdrive%\$Recycle.Bin
:: 删除 Windows 更新文件
echo 正在删除 Windows 更新文件...
del /f /s /q %windir%\SoftwareDistribution\Download\*
:: 清空用户缓存和临时文件
echo 正在清空用户缓存和临时文件...
del /f /s /q "%userprofile%\AppData\Local\Temp\*"
del /f /s /q "%userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files\*"
del /f /s /q "%userprofile%\Cookies\*"
:: 删除不必要的文件
echo 正在删除不必要的文件...
del /f /s /q "%windir%\Temp\*"
del /f /s /q "%systemroot%\Prefetch\*"
:: 清理系统还原点
echo 正在清理系统还原点...
vssadmin delete shadows /for=c: /all /quiet
echo 清理完成!
pause
保存bat文件,双击使用
版权声明:本文标题:电脑C盘清理脚本 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/jiaocheng/1740151849a1721105.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论