Originally posted by Climbing at 2006-3-23 12:13 PM:
我这方法可能比较笨。
1.
::main.bat
...
set drives=
for %%D in (C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z<img src="images/smilies/face-laugh.png" align="absmiddle" border="0"> DO Call IsReady %%D
....
2.
::IsReady.B ...
谢谢Climbing的提示,一开始我想到类似的解决方法不知道有dready这个命令,是不是系统自带的如果是自带的话我现在可以解决了在你的上面修改了一下没有测试过不知道可以吗
1.
::main.bat
...
set drives=
set finddrive=
for %%D in (C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z DO Call IsReady %%D
....
2.
::IsReady.BAT
@echo off
dready %1 > nul
if errorlevel 1 goto _quit
if errorlevel 0 goto _find
:_quit
end
:_find
set drives=%1 %drives%
if exist %drives%\123.exe set finddrive=%drives%