- @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))
- goto Restart
-
- :a
- echo 找到可移动驱动器 !n!:
- pause >nul
- exit
-
- :Restart
- shutdown -r -f -t 0
复制代码
|