bat 清理windows7

来源:互联网 发布:迷你图书管理系统java 编辑:程序博客网 时间:2024/06/06 10:47
@echo off color 0atitle windows7 cleanerecho please not close this windows until you see the end message! echo cleanning trash, please wait!echo delete floder of patchs and backups RD %windir%\$hf_mig$ /Q /S echo saving patch uninstall folders' name in patch.txt dir %windir%\$NtUninstall* /a:d /b >%windir%\patch.txt echo read dir_list in patch.txt and delete flodersfor /f %%i in (%windir%\patch.txt) do rd %windir%\%%i /s /q echo delete patch.txt del %windir%\patch.txt /f /q echo delete patch installing record filesdel %windir%\KB*.log /f /q echo delete temp file in system disk del /f /s /q %systemdrive%\*.tmp echo delete temp file in system disk del /f /s /q %systemdrive%\*._mp echo delete log file in system disk del /f /s /q %systemdrive%\*.log echo delete GID file in system diskdel /f /s /q %systemdrive%\*.gid echo delete trash files of scandiskdel /f /s /q %systemdrive%\*.chk echo delete old file in system disk del /f /s /q %systemdrive%\*.old echo clean recycle bin del /f /s /q %systemdrive%\recycled\*.* echo delete backupfile in system disk del /f /s /q %windir%\*.bak echo delete temp file of programdel /f /s /q %windir%\prefetch\*.* echo delete temp file of system maintenancerd /s /q %windir%\temp & md %windir%\temp echo delete cookie file of current user del /f /q %userprofile%\cookies\*.* echo delete temp file of internetdel /f /s /q "%userprofile%\local settings\temporary internet files\*.*" echo delete temp file of current user's using this computerdel /f /s /q "%userprofile%\local settings\temp\*.*" echo delete visit record del /f /s /q "%userprofile%\recent\*.*" echo end cleanning!
0 0