判断盘符是否存在, Call 脚本.
判断盘符是否存在, Call 脚本.
@echo off
if exist d: call d.bat
if exist e: call e.bat
if exist f: call f.bat
if exist g: call g.bat
if exist h: call h.bat
if exist i: call i.bat
pause
_______________________________________________________
D.bat 内容
D:
for /f "tokens=*" %%i in ('dir /ad /b') do attrib +h "%%i"
_______________________________________________
其它*.bat 内容都和D.bat 内容一样,只是盘符不一样
运行结果 :
只能Call 到 d.bat,其它的bat Call不到

解决疗.嘿...
调用 d.bat的时候 已经转入D盘目录
再调用e.bat 就调用不到了 要转回当前目录