源动力餐饮公司:如何用BAT编写一个可以删除IE临时文件夹下的文件?

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/20 18:36:04
列如 现在的清除系统垃圾自己编写的BAT!但是每次都删除不了C:\Documents and Settings\Admin\Local Settings\Temporary Internet Files下的文件
有没有方法!或是如何编写!
还有我的用户名是111 改如何编写 还用下面好象不太行?
强人给写个吧~
下面是我自己从网上找的顺便修改了一下
@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\Admin\Temporary Internet Files\*.*"
del /f /s /q "C:\Documents and Settings\Admin\Cookies\*.*"
del /f /s /q "%USERprofile%\Local Settings\Temp\*.*"
del /f /s /q "C:\Documents and Settings\Admin\Local Settings\Temporary Internet Files\*.*"
del /f /s /q "%userprofile%\recent\*.*"
echo 清除系统LJ完成!
echo. &

@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

把上面的文件复制到TXT文本里
把文件保存, 重命名为"删除临时文件.bat"
其实随便什么都可以
好用的话,记得给我加分

你那个和我差不多,但是缺了一句关键的pause
这个指令是停止

右键点击C盘,然后属性,然后清理磁盘就可以了