List local drives from command line

We can find the list of drives from Windows command prompt using the fsutil command on Windows 11 & 10. This lists all drive types, including mapped network drives visible to the current session.

fsutil fsinfo drives

Example:

D:\>fsutil fsinfo drives
Drives: C:\ D:\ Z:\
D:\>

To check whether a particular drive is fixed, removable or a network drive, we can run:

Advertisement
fsutil fsinfo drivetype C:

If fsutil reports that administrator privileges are required, run it from an elevated command prompt.

List local fixed drives using WMIC (older Windows systems)

On Windows 7 and other systems where WMIC is available, we can run the below command from Windows command prompt to get the list of local fixed drives.

wmic logicaldisk where "DriveType=3" get description,name

Here DriveType=3 selects local disks, without depending on the English word “Local” in the description. It excludes removable disks, network drives and CD/DVD drives.

WMIC is deprecated and is no longer included in current Windows 11 releases. This WMIC example is for older systems where the command is still available.

Advertisement

7 thoughts on “List local drives from command line”

  1. Thanks for the info. I was looking for this from couple of days . thanks

    Could u help me showing some more hidden commands in windows on my mail

    I will be very much thankful to you

    Reply

Leave a Comment