关于dos中的批处理

来源:百度知道 编辑:UC知道 时间:2024/05/12 05:20:11
@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 清除系统LJ完成!
echo. & pause
以上是我在网上找到的一个批处理文件,请问其中%有什么用,看不懂,请各位高手不吝赐教!
我的意思是那些%在语句中起什么作用?

用%%括起来的表示系统变量,在运行时,会被系统替换成当时的值.
比如%windir%表示windows安装目录,通常在运行时会被替换成"c:\windows"(xp系统),如果你的xp安装在d:\windows,那么它就会被替换成"d:\windows"

程序语言?

%指环境变量