阁下的首级 我收下了:批处理高手请进来 谁能给我解释一下这个批处理(尤其是call %0 %%a\%1.)

来源:百度文库 编辑:高考问答 时间:2024/05/02 02:13:06
@echo off
if not [%sub%]==[] goto %sub%
echo.
if not [%1]==[] goto seek0
echo syntax:
echo %0[filename]
echo ------ search executable file named [filename] in order
echo.
goto seeke
:seek0
set sub=seek1
for %%a in (.;%path%) do call %0 %%a\%1.
set sub=
echo.
goto seeke
:seek1
for %%b in (%1com;%1exe;%1bat) do if exist %%b echo %%b
:seeke