>>817 AドライブにFDがセットされてるかどうか知りたい場合、例えば以下のVBScriptファイル"testRDY.vbs"を作っておき、 バッチファイル内で CSCRIPT //NOLOGO testRDY.vbs A: | find /i "準備=True" > NUL IF NOT ERRORLEVEL 1 ECHO 準備OKです。 の2行を実行してみるってのはどう?
'---------+---------+---------+---------+---------+ VBScript始端 Option Explicit Dim A,D,F,A0,S,strTYP,strRDY Set A = WScript.Arguments : Set F = CreateObject("Scripting.FileSystemObject") S = "ERROR" : A0 = "" : If A.Count > 0 Then A0 = A(0) If Len(A0) > 0 Then Set D = F.GetDrive(A0) strTYP = D.DriveType : strRDY = D.IsReady If strTYP="1" Or strTYP="4" Then S = "Drive準備=" & strRDY Else S = "(このドライブはリムーバブルメディア/CD/DVDじゃないが)Drive準備=" & strRDY End If End If WScript.Echo(S) Set D = Nothing : Set F = Nothing : Set A = Nothing '---------+---------+---------+---------+---------+ VBScript終端