摩羯座自私:怎么自动删除临时文件
来源:百度文库 编辑:高考问答 时间:2024/05/01 05:37:18
把C:\Documents and Settings\****\Local Settings\Temporary Internet Files和C:\Documents and Settings\****\Local Settings\Temp里的文件全部删除就OK了!!!"****"是你的用户名,直接替换一下上面的地址.
打开“开始”菜单,选择“程序→ms-dos方式”,用纯文本编辑器编辑autoexec.bat文件(即在dos方式下运行命令:“edit autoexec.exe”),在这个自动运行的批处理文件中,环境变量temp和tmp定义了windows运行过程中临时文件的存储位置,默认位置为“\windows\temp”文件夹)。
原autoexec.bat文件为:
set comspec=c:\windows\command.com
set windir=c:\windows
set winbootdir=c:\windows
set path=c:\windows;c:\windows\command
set prompt=$p$g
set temp=c:\windows\temp
set tmp=c:\windows\temp
经编辑后的autoexec.bat文件为:
set comspec=c:\windows\command.com
set windir=c:\windows
set winbootdir=c:\windows
set path=c:\windows;c:\windows\command
set prompt=$p$g
deltree /y x:\temp(删除临时文件文件夹,其中x为该文件夹所在的驱动器)
md x:\temp(创建临时文件文件夹,x为你的盘符)
set temp=d:\temp
set tmp=d:\temp
文件编辑完毕后存盘即可。经过以上的设定,用户以后每次启动计算机都会自动删除临时文件。
在Windows在安装和使用过程中都会产生相当多的垃圾文件,包括临时文件(如:*.tmp、*._mp)日志文件(*.log)、临时帮助文件(*.gid)、磁盘检查文件(*.chk)、临时备份文件(如:*.old、*.bak)以及其他临时文件。特别
是如果一段时间不清理IE的临时文件夹“Temporary Internet Files”,其中的缓存文件有时会占用上百MB的磁盘空间。这些LJ文件不仅仅浪费了宝贵的磁盘空间,严重时还会使系统运行慢如蜗牛。这点相信你肯定忍受不了吧!所以应及时清理系统的LJ文件的淤塞,保持系统的“苗条”身材,轻松流畅上网!朋友来吧,现在就让我们一起来快速清除系统垃圾吧!!
下面是步骤很简单就两步!
在桌面上点鼠标右键,选择新建一个“记事本”,把下面的字复制进去,点“另存为”,把文件名定为“清除系统LJ.bat”就完成,记住后缀名一定要是.bat,好ok了!你的垃圾清除器就这样制作成功了!双击它就能很快地清理垃圾文件,大约一分钟不到。
PS. 要复制进去的字是 见下
@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 清除系统LJ完成!
echo. & pause
以后只要双击运行该文件,当屏幕提示“清除系统LJ完成!就还你一个“苗条”的系统了!!到时候再看看你的电脑,是不是急速如飞呢?
注:LJ就是垃圾的意思!这招比那些所谓的优化大师好用!不会破坏系统文件。
向你推荐一款软件:RAMDISK
把内存分出来一部分模拟成硬盘,然后在系统属性里面把所有临时文件目录更改到你所模拟出来的那个盘里面,那么只要一关机或重启,临时文件自动就会清除了
如果需要的话,可以联系我:xyxq.cn@163.com
不能自动~只能手动~
3721之类的软件