I know I can use the following command to list the available drives:
Code: Select all
usr.exe list -s
Example of what I want to accomplish:
Code: Select all
if usr.exe list -s contains 726060ALE610 (
set diskStatus=readyToUse
)
Code: Select all
usr.exe list -s
Code: Select all
if usr.exe list -s contains 726060ALE610 (
set diskStatus=readyToUse
)
Code: Select all
1. PLDS DVD-RW DS8A8SH (E:)
Code: Select all
1. PLDS DVD-RW DS8A8SH (E:) (safely removed)
Code: Select all
usr.exe list -s | findstr %drvMdl%
if %errorlevel% == 0 (
set drvStatus=ready
) else (
set drvStatus=notFound
)
Code: Select all
mountvol x: /L