初学批处理,这几天一直想找一个系统垃圾文件清理的批处理,之前了解过相关的东西,后来发现网上找到的千篇一律,都是同一个批处理,写的不太全面,然后怒了!!干脆自己写了一个,高手看看有漏下的,帮忙补充一下 | @ECHO OFF | | ECHO 正在清理 | | DEL /F /S /Q "%SYSTEMDRIVE%\*._MP" | | DEL /F /S /Q "%SYSTEMDRIVE%\*.BAK" | | DEL /F /S /Q "%SYSTEMDRIVE%\*.CHK" | | DEL /F /S /Q "%SYSTEMDRIVE%\*.DMP" | | DEL /F /S /Q "%SYSTEMDRIVE%\*.FTG" | | DEL /F /S /Q "%SYSTEMDRIVE%\*.FTS" | | DEL /F /S /Q "%SYSTEMDRIVE%\*.GID" | | DEL /F /S /Q "%SYSTEMDRIVE%\*.LOG" | | DEL /F /S /Q "%SYSTEMDRIVE%\*.OLD" | | DEL /F /S /Q "%SYSTEMDRIVE%\*.TMP" | | DEL /F /S /Q "%SYSTEMDRIVE%\Thumbs.db" | | DEL /F /S /Q "%SYSTEMDRIVE%\RECYCLER\*.*" | | DEL /F /S /Q "%SYSTEMROOT%\TEMP\*.*" | | DEL /F /S /Q "%SYSTEMROOT%\PREFETCH\*.*" | | DEL /F /S /Q "%USERPROFILE%\RECENT\*.*" | | DEL /F /S /Q "%USERPROFILE%\COOKIES\*.*" | | 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\*.*" | | RD /S /Q "%SYSTEMROOT%\$HF_MIG$" | | RD /S /Q "%SYSTEMROOT%\IE7UPDATES" | | RD /S /Q "%SYSTEMROOT%\Temp" & MD "%SYSTEMROOT%\Temp" | | RD /S /Q "%USERPROFILE%\LOCAL SETTINGS\Temp" & MD "%USERPROFILE%\LOCAL SETTINGS\Temp" | | FOR /F %%A IN ('DIR /B /AD %SYSTEMROOT% ^| FINDSTR "^$Nt"') DO RD /S /Q %SYSTEMROOT%\%%A | | FOR /F %%A IN ('DIR /B /AD %SYSTEMDRIVE% ^| FINDSTR "^FOUND"') DO RD /S /Q %SYSTEMDRIVE%\%%A | | ECHO 清理完成COPY |
|