dude..what are you trying to do?
If you couldn't tell by looking at it, you could have copied it and run it, then you'd know.
First a variable %dirlist% is created and left blank
Then in the first loop:-
- is extracted from the output of fsutil, for each drive on the system, the drive letter, a colon and a backslash eg C:\
- neatly using CALL SET, each such 3 char string is appended with a leading space to the string variable %dirlist% eg C:\ D:\ E:\
The second loop:-
- iterates through this string variable %dirlist% and for each drive calls fsutil to get drivetype eg
C:\ - Fixed Drive
D:\ - Fixed Drive
E:\ - CD-ROM Drive
nwlun, if you want to get this output into a text file, just redirect the output to a text file, and you can use TYPE to see it on the screen if desired.
@echo off
if exist dt.txt del dt.txt
set drlist=
for /f "tokens=*" %%a in ('fsutil fsinfo drives^|find /v ""') do (
set dr=%%a
call set drlist=%%drlist%% %%dr:~-3%%
)
for %%a in (%drlist%) do fsutil fsinfo drivetype %%a >> dt.txt
type dt.txt