;
Posted: 02 Jul 2008 07:49
The author has been removed this message.
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%