丙戊年是什么时候:一个关机时要运行的删除垃圾文件的程序

来源:百度文库 编辑:高校问答 时间:2024/04/28 21:30:10
我以前在“知道”里看到了一个有关关机时自动运行删除一些垃圾的脚本文件的程序!
我用了,但我没有保存到别的盘上,前几天重装了系统,才发现它没了,现在求哪位大虾帮帮忙弄回来,好像是用记事本写的然后在保存里换一下什么格式的!
特别实用,这样子我就不用自己动手清理磁盘了。

谢谢各位大虾
weishihao 谢谢你。。

但我上次看到的那个是由记事本转换成的,你能再教一教吗?

将下列命令建立一个批处理文件放到启动项里
没次开机的时候会自动帮您清理

@echo off
if exist c:\windows\temp\*.* del c:\windows\temp\*.*
if exist c:\windows\Tempor~1\*.* del c:\windows\Tempor~1\*.*
if exist c:\windows\History\*.* del c:\windows\History\*.*
if exist c:\windows\recent\*.* del c:\windows\recent\*.*

快速清除系统LJ!保持系统的“苗条”身材

在使用电脑时,你是否发现系统磁盘的可用空间正在一天天减少?而Windows在安装和使用过程中会产生相当多的LJ文件,包括临时文件(如:*.tmp、*._mp)日志文件(*.log)、临时帮助文件(*.gid)、磁盘检查文件(*.chk)、临时备份文件(如:*.old、*.bak)以及其他临时文件。特别是如果一段时间不清理IE的临时文件夹“Temporary Internet Files”,其中的缓存文件有时会占用上百MB的磁盘空间。这些LJ文件不仅仅浪费了宝贵的磁盘空间,严重时还会使系统运行慢如蜗牛。这点相信你肯定忍受不了吧!所以应及时清理系统的LJ文件保持系统的“苗条”身材。那现在就让我们一起来快速清除系统LJ吧!!

新建一个记事本并输入以下蓝色字体内容:

@echo off
echo 正在清除系统LJ文件,请稍等......
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 清除系统LJ完成!
echo. & pause

最后将它保存为后缀名为.bat的批处理文件,更名为“清除系统LJ.bat”,以后只要双击运行该批处理文件,当屏幕提示“清除系统LJ完成!还您一个“苗条”的系统!!”时,就已经把系统中的大部分LJ“请走了”。
清除LJ完成后,再看看你的电脑,是不是颇有成就感呢?