联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
Dim Fso,Fd Dim F_list set Fso=createobject("scripting.filesystemobject") set Fd=Fso.drives for each d in Fd if d.isready and d.drivetype=2 then F_list=d.driveletter end if next msgbox "The Last Drive is:"& F_list
@echo off for %%a in (c d e f g h i j k l m n o p q r s t u v w x y z) do ( for /f %%h in ('fsutil fsinfo drivetype %%a:^|findstr /i "Drive"') do set LastDri=%%h ) echo %LastDri% pause
@echo off for %%a in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (for /f %%h in ('fsutil fsinfo drivetype %%a:^|findstr /i "固定驱动器"') do set LastDrive=%%h) echo %LastDrive% pause
@echo off for %%a in (c d e f g h i j k l m n o p q r s t u v w x y z) do ( for /f %%h in ('fsutil fsinfo drivetype %%a:^|findstr /i "Fixed 固定驱动器"') do set LastDri=%%h ) echo %LastDri% pause