标题: 请高手们帮个忙!优化删除垃圾文件的批处理命令
[打印本页]
作者: xiaqingdg
时间: 2010-2-4 13:13
标题: 请高手们帮个忙!优化删除垃圾文件的批处理命令
@echo off
echo 正在清理系统垃圾文件,请稍等......
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
rem 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\*.*
rem rd /s /q %windir%\temp & md %windir%\temp
rem del /f /q %userprofile%\cookies\*.*
del /f /q %alluserprofile%\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
待优化内容
1 rem rd /s /q %windir%\temp & md %windir%\temp
rem del /f /q %alluserprofile%\cookies\*.*
因为不方便,且会造成部分软件无法卸载的情况
2 del /f /q %alluserprofile%\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\*.*"
因为语句中只是删除当前用户的文件,对在域环境下多用户登录过的机器作用不大。
作者: HAT
时间: 2010-2-4 15:40
作者: xiaqingdg
时间: 2010-2-4 16:23
谢谢,不过C盘空间不足总是心头大患,尤其是在一个四五百台电脑都面临这样的局面的时候。斑竹是否有更好的方法呢?
作者: weasel
时间: 2010-2-4 22:46
版主的话经典“网上流传的某些“删除系统垃圾的批处理”其实本身就是一个垃圾”
作者: jobszheng5
时间: 2010-2-5 12:55
想想我还真没有优化过!
有时间我也注意一下!