现在的位置: 首页 > 技术分享 > 电脑技术 > 正文

[批处理]一键清理Window7垃圾文件

2013年12月28日 电脑技术 ⁄ 共 703字 ⁄ 字号 暂无评论

电脑运行一段时间都会产生大量的垃圾文件,使得系统越来越慢,怎么将系统垃圾文件清理干净呢?现针对Windows7用户提供一个简单的简单的批处理从而实现一键清理Window7垃圾文件,批处理代码如下:

@echo off
RD %windir%\$hf_mig$ /Q /S
dir %windir%\$NtUninstall* /a:d /b >%windir%\newwzp.txt
for /f %%i in (%windir%\newwzp.txt) do rd %windir%\%%i /s /q
del %windir%\newwzp.txt /f /q
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
del /f /s /q %systemdrive%\*.log
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 /s /q "%userprofile%\local settings\temporary internet files\*.*"
del /f /s /q "%userprofile%\local settings\temp\*.*"
echo. pause

使用方法:新建一个记事本文件,将以上代码复制到记事本内,然后另存为‘一键清理Window7垃圾文件.bat’即可。

运行图示:

一键清理Windows7垃圾文件

给我留言

留言无头像?


×