NewsRhzhi | 先创资讯 | 旧版入口
rhzhi.net
网站首页 | NewsRhzhi | 先创资讯 | 操作系统 | 工具软件 | 办公软件 | 网站设计 | 组网专栏 | 平面设计 | 多 媒 体 | 程序开发 | 硬件资料 | 聊天软件
您现在的位置: 先创网 >> 操作系统 >> 系统技巧 >> 文章正文
流行的垃圾清理批处理命令的研究
Pchome
2008-1-29 12:34:54文/佚名
    

关于网上流行的系统垃圾清理的批处理命令的源代码如下:  

  。@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   

  分析一下吧:@echo off是关闭dos窗口中的命令提示,   

  *.bak为一些软件备份的垃圾文件;
  
  *.tmp为一些程序生成的临时文件;   

  *.chk为硬盘检查时生成的恢复文件,一般也没有用,前面几项都是删除系统所在分区的临时文件,所以没事,del /f /s /q   

  del是删除,/f是强制删除只读文件,/s是删除指定目录中所有文件,/q是安静默式,即删除的时候不用确认。  

  del /f /s /q %systemdrive%\recycled\*.*是指删除系统分区回收站里面的所有文件。

  del /f /s /q %windir%\prefetch\*.*是删除系统预读文件夹内的所有文件,也不影响,一般预读文件太大,反而会影响速度。   

  del /f /q %userprofile%\cookies\*.*是删除上网时产生的用户名和密码。   

  del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"   

  del /f /s /q "%userprofile%\Local Settings\Temp\*.*"都是删除临时文件,可删除   

  del /f /s /q "%userprofile%\recent\*.*"(安全)可删除  

  分析完毕,所以经此步骤后,并不会影响系统的稳定性,有些项目还可加速系统的启动速度,本文只是作为一个参考,如果大家有不同意见,可指出其中的错误。
  

打印此页 投稿与建议 返回顶部
栏 目 索 引
软件应用 SOFTWARE
Win XP | NT/2003
Win2000 | DOS/Win9x
PowerPoint | Office
Excel | Word
网络软件 | 实用软件
媒体软件 | 系统软件
常用软件 | 办公软件
聊天软件 | 网络安全
新软试用 | Vista
设计在线 DESIGN
Dreamweaver | 3DMax
Photoshop | Flash
平面设计 | 网页设计
多 媒 体 | 精品画廊
精彩专区 SPECIAL
Q Q 专区 | 热门专题
组网玩网 | 程序开发
应用集锦 |
相关文章
关于我们 - 联系方式 - 合作伙伴 - 网站大事记 - 网站地图 - 我要投稿
Copyright ©1997-2008 先创网 All Rights Reserved.
先创科技 版权所有