List Current Drives

Dell / Dell dxp051...
June 29, 2009 at 02:15:45
Specs: Microsoft Windows XP Professional, 3.192 GHz / 3070 MB
hey again,

How do I echo out a list of currently active drives on the computer?


See More: List Current Drives

Report •


#1
June 29, 2009 at 02:39:35
You can extend the list all the way to z.

=========================
@echo off & setLocal enableDELAYedexpansion

for %%a in (c d e f g h) do (
vol %%a: > nul 2>nul
if not errorlevel 1 (
echo %%a
)
)


=====================================
If at first you don't succeed, you're about average.

M2


Report •

#2
June 29, 2009 at 02:42:47
Okay, Thanks.

I see this only outputs drives that are not only active but as do have something in them, any way to make it output the empty ones as well?


Report •

#3
June 29, 2009 at 03:11:30
Nothing to do with full or empty. It puts out all letters which exist.


=====================================
If at first you don't succeed, you're about average.

M2


Report •

Related Solutions

#4
June 29, 2009 at 03:15:04
I have a D drive and in the list, D isnt there.

As you can see in the pic below, I also have a I: drive as well, and its not listed either.

http://i44.tinypic.com/2eaqw50.png


Report •

#5
June 29, 2009 at 03:27:03
hmmm... It lists my d drive, even after I removed the volume label.

You got me. Are the drives not shown NTFS?


=====================================
If at first you don't succeed, you're about average.

M2


Report •

#6
June 29, 2009 at 03:30:05
Umm lol, there DISC drives. For cd's and what not, Ill try putting a disk in and then seeing if it shows up in the list.


*EDIT*

Okay, yes, it only shows the active drives that ACTUALLY have something in them. (I think) I knw it doest list them if they are a empty disc drive, idk about a empty HDD.

:)


Report •

#7
June 29, 2009 at 09:10:57
fsutil fsinfo drives


Report •


Ask Question