windows xp系统如何清理垃圾文件
  • 作者:佚名
  • 时间:2016-11-22

 我们知道,当xp系统使用了一段时间后就会产生一些垃圾文件,主要包括日志文件,备份文件,缓存文件等,这会占据许多空间。一般的用户都习惯安装XX优化大师或某些杀软来清理垃圾,其实我们完全可以使用代码命令来清理垃圾。那么用代码来给xp系统清理垃圾文件呢?下面小编就来给大家介绍一键清理系统垃圾代码和使用方法吧。

 

那我们怎样清除这些垃圾文件呢?笔者写了一个bat,用过不错,但是建议不要再服务器上使用,如果要在服务器上使用需要更改程序。

具体的使用方法:

打开记事本,在电脑屏幕的左下角按“开始→程序→附件→记事本”,复制以下内容到记事本中:

@echo off

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

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\*.*"

echo 清除系统垃圾完成!

echo. & pause

第二步:复制进去后,点“另存为”,路径选“桌面”,保存类型为“所有文件”,文件名为“清除系统垃圾.bat”,就ok了。记住后缀名一定要是.bat,你的垃圾清除器就这样制作成功了! 双击它就能很快地清理垃圾文件,大约一分钟不到。

当屏幕提示“清除垃圾系统完成!”时,你的系统又焕发出“青春”的活力了。值得注意的是,这种方法比使用XX优化大师这类的要方便,对系统也更安全。

以上内容就是windows xp系统清理垃圾文件的方法了,想要知道一键清理系统垃圾代码,那就快来看看这篇文章吧。

相关推荐