小伙伴们是不是觉得自己的C盘突然爆红,会有种很焦虑的赶脚,心里肯定想,完了完了,要爆掉了,要爆掉了,导致电脑卡死了。
公司开发一直都是在内网进行开发的,最近发现,都没安装什么程序,就自己的C盘就已经爆红了,导致在开发的时候,尤其是打开比较多工程的solution时,电脑会变得很迟钝。于是,写了个b程序文件,经过测试,清理掉了很多系统中的垃圾数据。现在分享出来给大家。
@echo off
echo Start to clear system userless files, please waiting…
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%\recycle*.*
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 Setting\Temp*.”
del /f /s /q “%userprofile%\recent*."
del /f /s /q "C:\User\name\AppData\Local\Temp*.”(此处为自己C盘temp路径)
echo Clear system useless files finished!
如果有错误,希望各位大神指出来,谢谢。