H
Herb Martin
Esra Sdrawkcab said:Herb said:Dean Wells (MVP) said:Nod, I thought of the same thing re: the letter-depth but figured it's
so nigh-on moot for the same reasons ...
That's why I did like the pipe to find "\".
Here's the current one that doesn't mess up with "Drives:"
on XP (I hadn't notice the error until Esra pointed that
out (I was testing under 2003 mostly and who would have
thought that XP and 2003 which both WORK basicly
would be different in a new way?)
[Following is all one line for a batch file]
@for /f %%a in ('fsutil fsinfo drives ^| find "\"') do @if not
"%%a"=="Drives:" fsutil fsinfo drivetype %%a
I didn't use "For" option SKIP=1 because it would be different
for XP vs. 2003.
Sure that skips the text "Drives:" but it doesn't pick up my floppy drive
letter
Harlan's works best (likely even for that A and it is pretty much the
simplest (not QUITE elegant but it beats mine) and uses no weird
tricks, external utilities, nor temp files.
It works as is on (at least) XP, 2003, and Vista:
[All one line for batch file:]
@(for %%d in (A B 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
@fsutil fsinfo drivetype %%d | @find "No such " /v