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
[ Last edited by chishingchan on 2008-11-25 at 22:54 ]
@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