Board logo

标题: 让电脑在关机时自动清理垃圾文件 [打印本页]

作者: 邹光华    时间: 2009-7-28 18:39     标题: 让电脑在关机时自动清理垃圾文件

1、打开“记事本”,然后输入以下内容:





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





2、将其保存为所有文档"C:\cleanpc.bat".

3、执行:开始-运行的命令,在打开的"运行"窗口中输入"gpedit.msc". 然后单击"组策略"窗口.


4、在左侧窗口中,依次打开"计算机配置"-WINDOWS设置-脚本(启动\关机)"
然后从左侧表格中.双击"关机"命令.打开"关机属性"对话框



5、单击添加"按钮.打开"添加脚本"对话框.在"脚本名"文本框中
输入"C:\cleanpc.bat".


6、连续单击"确定"按钮.这样,计算机在每次关机时,系统就会自动清理垃圾文件,让你的WINDOWS时刻保持清洁,良好的性能.

作者: 智强家维    时间: 2009-8-2 06:05

谢谢楼主热心,论坛有你更精彩!
作者: 杨汝军    时间: 2009-8-5 21:42

试试..........
作者: 学员5701-01    时间: 2009-9-21 21:27

感谢分享,哪天试试。楼主辛苦了!
作者: 吕六391    时间: 2009-9-22 12:04

经典之作,学习来了!
作者: 黄山黄河    时间: 2009-9-22 12:12

感谢分享,楼主辛苦了!
作者: szgeosun    时间: 2009-9-22 22:27

感谢分享!!!
作者: szgeosun    时间: 2009-9-22 22:28

谢谢分享,论坛有你更精彩!!!
作者: 小阮    时间: 2009-9-27 16:21

学习了回头试试
作者: 张贵举    时间: 2010-6-11 15:34

看看好用不
作者: 272108343    时间: 2010-6-15 12:29

本帖最后由 272108343 于 2010-6-15 12:32 编辑

有个问题要说一下,要是那种安装某些软件必须重启的时候,重启后必须用到TEMP下面的某些文件,如果关机时执行这个批处理的话,所有TEMP下面的东西全部没了,安装会不会失败呢?
只是一个猜想,欢迎大家讨论一下

作者: 山西小王    时间: 2010-6-18 12:38

哪天试试。楼主辛苦了
作者: 花园市场    时间: 2010-6-20 22:12

论坛有你更精彩!
作者: xd44    时间: 2010-6-28 21:43

怎么文件找不到?
作者: 邹国杰    时间: 2010-7-4 17:09

我试试,谢谢你的分享
作者: 顺意来    时间: 2010-8-1 00:03

太麻烦了,软件好用点
作者: 生命线    时间: 2010-10-7 21:40

还是手动的安心点。
作者: 大众家电制冷    时间: 2010-10-8 22:08

感谢分享论坛有你更精彩




欢迎光临 『家电维修论坛 163DZ.COM』 (http://163dz.com/bbs/) Powered by Discuz! 7.0.0