很简单,所谓删除垃圾,也就是删除一些网页存储的缓存文件啦!还有什么电脑的日志啊!记录之类的,不过每天产生这些文件的话,日久聚多。影响电脑运行,而这些文件对于我们来说又没有什么用处。所以删除掉,增加磁盘空间。达到避免受到诸多影响的目的。
我们用批处理命令 del 就可以达到目的:删除每天产生的那些不必要的文件。
例如:下列的位置都是产生我们所谓垃圾的地方。就是用del命令进行清除的。
@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
@echo off
ipconfig /flashdns
netsh int ip reset c:\resetlog.txt