清理系统的脚本

 

把以下代码保存为clean.bat,双击运行。

代码
  1. @echo off   
  2.   
  3. echo 清空IE临时文件目录…   
  4. del /f /s /q “%userprofile%\Local Settings\Temporary Internet Files\*.*”   
  5. del /f /s /q “%userprofile%\Local Settings\Temp\*.*”   
  6.   
  7. echo 正在清除系统临时文件 *.tmp *._tmp *.log *.chk *.old ,请稍等…   
  8. del /f /s /q %systemdrive%\*.tmp   
  9. del /f /s /q %systemdrive%\*._mp   
  10. rem .log大部分有可能有用   
  11. rem del /f /s /q %systemdrive%\*.log   
  12. del /f /s /q %systemdrive%\*.gid   
  13. del /f /s /q %systemdrive%\*.chk   
  14. del /f /s /q %systemdrive%\*.old   
  15.   
  16. echo 清空垃圾箱,备份文件和预缓存脚本…   
  17. del /f /s /q %systemdrive%\recycled\*.*   
  18. del /f /s /q %windir%\*.bak   
  19. del /f /s /q %windir%\prefetch\*.*   
  20. rd /s /q %windir%\temp & md %windir%\temp   
  21.   
  22. rem cooke和最近历史还是保留吧…   
  23. rem del /f /q %userprofile%\COOKIES s\*.*   
  24. rem del /f /q %userprofile%\recent\*.*   
  25.   
  26. echo 清理系统盘无用文件…   
  27. %windir%\system32\sfc.exe /purgecache   
  28.   
  29. echo 优化预读信息…   
  30. %windir%\system32\defrag.exe %systemdrive% -b   
  31.   
  32. echo 清除系统完成!   
  33.   
  34. echo. & pause  

 

from:http://www.mrshi.com/other/clean-bat/

« 上一篇 | 下一篇 »

Trackbacks

点击获得Trackback地址,Encode: UTF-8 点击获得Trackback地址,Encode: GB2312 or GBK 点击获得Trackback地址,Encode: BIG5

发表评论

评论内容 (必填):