Drive Types

List all drives connected and corresponding types, i.e. Fixed, CD-ROM, Removable.

Description: The FSUTIL program can be used from the command line to query information about the connected drives.

Return all currently connected drives:
fsutil fsinfo drives
Returns e.g.: Drives: C:\ D:\ E:\ F:\

Return the drive type for a given drive:
fsutil fsinfo drivetype D:\
Returns e.g.: D:\ - Fixed Drive

To get the drive type of all drives parse the output of fsutil fsinfo drives with a FOR command and run fsutil fsinfo drivetype for each drive. However some experimenting showed that funny things happen when parsing the result of fsutil fsinfo drives using the FOR command, some line feeds seem to be missing. Piping the fsutil output through the find command seems to resolve this problem.
Script: Download: BatchDriveType.bat  
set "drlist="
for /f "tokens=*" %%A in ('fsutil fsinfo drives^|find "\"') do (
    set "dr=%%A"
    call set "drlist=%%drlist%% %%dr:~-3%%"
for %%A in (%drlist%) do fsutil fsinfo drivetype %%A
Script Output:
 DOS Script Output
C:\ - Fixed Drive
D:\ - Fixed Drive
E:\ - CD-ROM Drive
F:\ - Removable Drive