引言:大家都知道,随着时间的推荐,我们电脑系统的C盘缓存的临时数据、无用数据会越来越多,这会导致我们的系统运行速度被大大拖慢,所有这里教大家怎么制作一个简单的清理C盘临时数据和无用数据的小程序。
制作步骤:
- 新建一个TXT文件,命名为:系统清理.bat
- 用记事本打开,然后编辑,写入以下代码:
代码清单:
@echo off
echo 正在清理系统垃圾文件,请稍等......
del /s /f /q c:\windows\temp\*.*
rd /s /q c:windows\temp
md c:\windows\temp
del /s /f /q C:\WINDOWS\Prefetch
del /s /f /q %temp%\*.*
rd /s /q %temp%
md %temp%
deltree /y c:\windows\tempor~1
deltree /y c:\windows\temp
deltree /y c:\windows\tmp
deltree /y c:\windows\ff*.tmp
deltree /y c:\windows\history
deltree /y c:\windows\cookies
deltree /y c:\windows\recent
deltree /y c:\windows\spool\printers
del /f /s /q %systemdrive%\*.tmp
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%\Local Settings\Temporary Internet Files\*.*"
del /f /s /q "%userprofile%\Local Settings\Temp\*.*"
del /f /s /q "%userprofile%\recent\*.*"
del c:\WIN386.SWP
echo系统清除结束!
echo. & pause
- 代码写好后保存。
- 使用的时候双击运行即可。