怎么自动删除临时文件

来源:百度知道 编辑:UC知道 时间:2024/05/11 18:54:48

把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(删除临时