try this one:
@echo off
set AllDrive=c d e f g h i j k l m n o p q r s t u v w x y z
cd.>%tmp%\MyDrive.txt
for %%a in (%AllDrive%) do (
fsutil fsinfo drivetype %%a: | find /i "Removable Drive">>%tmp%\MyDrive.txt
)
for /f "tokens=1 delims= " %%h in (%tmp%\MyDrive.txt) do (
echo %%h is a usb drive.
)
del %tmp%\MyDrive.txt
Last edited by HAT on 2007-6-25 at 03:54 PM ]