Page 1 of 1

;

Posted: 02 Jul 2008 07:49
by carlitos.dll
The author has been removed this message.

Posted: 03 Jul 2008 23:56
by DosItHelp
carlitos.dll

Thanks for sharing, haven't tried you solution but isn't this shorter?

Code: Select all

@echo off
set "removableDr="
set "drlist="
for /f "tokens=*" %%a in ('fsutil fsinfo drives^|find /v ""') do (
    set dr=%%a
    call set "drlist=%%drlist%% %%dr:~-3%%"
)
for %%a in (%drlist%) do (
    fsutil fsinfo drivetype %%a|find /i "Removable drive">NUL&&(
        call set "removableDr=%%removableDr%% %%a"
    )
)
echo removable drives: %removableDr%


:wink: