Friday, 9 December 2011

Script to list Drives and Types

First copy this code to notepad then save as name(any name).bat...for eg. "hello.bat"....and then double click it to run it.

@echo off
 setlocal

::
REM Get and list drive types using fsutil
::
set "list="

for /f "tokens=*" %%a in ('^
fsutil fsinfo drives^|^
find /V ""'

) do (

set "dv=%%a"
call set "list=%%list%% %%dv:~-3%%"
)
for %%a in (%list%) do (
fsutil fsinfo drivetype %%a
)

No comments:

Post a Comment