;
Moderator: DosItHelp
-
- Posts: 11
- Joined: 02 Jul 2008 07:42
;
The author has been removed this message.
Last edited by carlitos.dll on 30 Sep 2011 22:54, edited 5 times in total.
carlitos.dll
Thanks for sharing, haven't tried you solution but isn't this shorter?
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%