admin 管理员组文章数量: 1184232
系统垃圾既占空间,又可能暗藏病毒。手动清除费事,建议用批处理。
1。准备知识
a.环境变量,运行/cmd/set,可以看到
"%userprofile%,系统当前用户的文件夹,平时产生的垃圾主要在这里
"%userprofile%/recent 最近的文档
"%userprofile%/local settings/Temp
"%userprofile%/local settings/History ie历史
"%userprofile%/local settings/Temporary Internet Files ie临时文件
b.Del命令
/q 安静 /s 包括子目录 /f 强制
2.批处理脚本
echo 正在清除系统垃圾文件,请稍等......
del /f /q %userprofile%/recent/*.*
del /f /s /q "%userprofile%/Local Settings/Temp/*.*"
del /f /s /q "%userprofile%/Local Settings/History/*.*"
del /f /s /q "%userprofile%/Local Settings/Temporary Internet Files/*.*"
echo 清除系统垃圾完成!
3.更全的垃圾删除脚本
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 清除系统垃圾完成!
版权声明:本文标题:批量清理系统垃圾 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/p/1774019253a3568382.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论