如何整理Windows服务器的C盘垃圾文件
 

Windows服务器运行一段时间后,服务器的C盘越来越小,如果C盘满了,很多程序将无法运行.下面将通过编写一个bat的文件来批量清理C盘的垃圾文件. 请注意:清理C盘具有一些危险,请您仔细阅读下面的bat文件,确定里面没有您需要的重要文件,再执行操作.

@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

把上面的内容保存为一个bat文件放到服务器的桌面上,然后双击执行即可.


也许下面的会对您有所帮助:

易网主机关于租用/拖管/VPS服务器远程端口修改说明?
http://www.34514.cn/style/info/shownews.asp?id=453

易网主机关于服务器租用/拖管常见问题详细解答?
http://www.34514.cn/style/info/shownews.asp?id=472

VPS虚拟服务器用途有那些?
http://www.34514.cn/style/info/shownews.asp?id=179