哪位高手帮我编写一个批处理文件?

来源:百度知道 编辑:UC知道 时间:2024/05/14 11:45:58
删除以下文件夹中的内容:

C:\Documents and Settings\用户名\Cookies\下的所有文件(保留index文件)

C:\Documents and Settings\用户名\Local Settings\Temp\下的所有文件(用户临时文件)

C:\Documents and Settings\用户名\LocalSettings\TemporaryInternet Files\下的所有文件(页面文件)

C:\Documents and Settings\用户名\Local Settings\History\下的所有文件(历史纪录)

C:\Documents and Settings\用户名\Recent\下的所有文件(最近浏览文件的快捷方式)

C:\WINDOWS\Temp\下的所有文件(临时文件)

C:\WINDOWS\ServicePackFiles(升级sp1或sp2后的备份文件)

C:\WINDOWS\Driver Cache\i386下的压缩文件(驱动程序的备份文件)

C:\WINDOWS\SoftwareDistribution\download下的所有文件

C:\windows\下以 $u... 开头的隐藏文件

还有这些文件夹里有些东西是系统文件,手动删是删不了的,用了批处理会不会把这些东西删掉??可以避免么?要不要做个备份?高手帮帮忙。。我把我所有得分都拿出来了。。。5555.。。

CODE:[Copy to clipboard]at echo off
echo 正在清除系统垃圾文件,请稍等 dot .....
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 "%alluserprofile%C:\Documents and Settings\LocalService\Local Settings\Temporary Internet Files\*.*"
del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
del /f /s /q "%userprofile%\Local Settings\Temp\*.*"
del /f /s /q "%userprofile%\recent\*.