Windows - 系统 - 垃圾清理 - 脚本
Windows - 系统 - 垃圾清理 - 脚本

清理系统垃圾

@echo off

echo 正在清除系统垃圾文件,请稍等......

del /f /s /q  %systemdrive%\Windows\Temp\*.*
del /f /s /q  %systemdrive%\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\*.*
del /f /s /q  %systemdrive%\Windows\ServiceProfiles\LocalService\AppData\Local\Temp\*.*
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%\recycled\*.*
del /f /s /q  %windir%\*.bak
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%\AppData\Local\Temp\*.*
del /f /s /q  %userprofile%\Local Settings\Temporary Internet Files\*.*
del /f /s /q  %userprofile%\Local Settings\Temp\*.*
del /f /s /q  %userprofile%\recent\*.*
del /f /s /q  %windir%\system32\dllcache\*.*

echo 正在清除驱动在安装时留下的解压文件,请稍等......

del /f /s /q  %SystemDrive%\AMD\*.*
del /f /s /q  %windir%\Intel\*.*
del /f /s /q  %windir%\NVIDIA\*.*
del /f /s /q  %windir%\Prog\*.*

echo 清除系统垃圾完成!

echo. & pause

最后修改于 2024-02-03

此篇文章的评论功能已经停用。