是这样吗?- @echo off
- setlocal enabledelayedexpansion
- set "y=C D E F G H I J K L M N O P Q R S T U V W X Y Z"
- for %%a in (%y%) do (
- fsutil fsinfo drivetype %%a: | find /i "可移动驱动器" 1>nul
-
- 2>nul&&set a=1||set a=0
- if !a! equ 1 (set n=%%a&goto a))
- echo 未找到可移动驱动器
- pause&exit
- :a
- echo 找到可移动驱动器 !n!:
- pause
复制代码
|