一键清理系统垃圾(转载)

来源:百度文库 编辑:神马文学网 时间:2024/04/30 08:13:44
@echo offecho -----------------------------------------------------------------------------
echo 清空IE临时文件目录...
del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
del /f /s /q "%userprofile%\Local Settings\Temp\*.*"echo 正在清除系统临时文件 *.tmp *._tmp *.log *.chk *.old ,请稍等...
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
rem .log大部分有可能有用
rem del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.oldecho 清空垃圾箱,备份文件和预缓存脚本...
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%\temprem cooke和最近历史还是保留吧...
rem del /f /q %userprofile%\COOKIES s\*.*
rem del /f /q %userprofile%\recent\*.*echo 清理系统盘无用文件...
%windir%\system32\sfc.exe /purgecacheecho 优化预读信息...
%windir%\system32\defrag.exe %systemdrive% -becho 清除系统完成!echo ----------------------------------------------------------------------------- 把以上内容用txt文档打开,另存为“文件名:一键清理系统垃圾.bat,保存类型:所有文件”即可。