用记事本遍写的清除系统垃圾时的问题?

来源:百度知道 编辑:UC知道 时间:2024/06/23 13:02:58
在网上搜索了一些关于自己编写清除垃圾文件的方法有些不明白的地方!希望能得到答案!
可以发邮件给我photoshopjmx@163.com 感谢``
@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 Job Finished!
echo. & pause

问题:
1. /f

1、/q 删除之前不要求确认
/f 强制删除只读文件
/s 从所有子目录删除文件
2、在XP下分别是:
X:\windows\system32
X:\windows
X:\Documents and Settings\(当前用户名)

3、不用处理,它用的都是系统变量
4、del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
del /f /s /q "%userprofile%\Local Settings\Temp\*.*"
上面已经有,你只需要以Admin登录并执行即可

%systemdrive%系统操作文件夹
%windir%系统文件夹就是windows,winnt
%userprofile%用户文件夹