


| Quote: | |
|
CODE: [Copy to clipboard]@echo off
rem 提取U盘的盘符
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,2,3,4 delims= " %%h in (%tmp%\MyDrive.txt) do (
echo %%h is a usb drive.
)
del %tmp%\MyDrive.txt

| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |