[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


Get list of local disk drives from batch script

Posted on 2004-09-28
Medium Priority
Last Modified: 2008-02-01

I need to be able to generate a list of local disk drives that are attached to a system. I need to run this from a batch file, then I will perform various operations on the disk drives in the list.

I have done a bit of research on this but cannot find a way to do this. Please help a UNIX admin solve this Windows issue.

Thank you

Question by:jvossler
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2

Expert Comment

ID: 12171261
You could try the "map" command, but it gives you a lot of output.  I'm guessing that you need to run commands against the output?  I saw your other post about command-line mailing; related?  If you let us in on the entire story perhaps we could offer more help.

LVL 86

Expert Comment

ID: 12171268
'msinfo32.exe' can do that. Type 'msinfo32 /?' on the command line for more options. It should be like

msinfo32 /category ComponentsStorageDrives /report drives.txt

Author Comment

ID: 12171662
Mt two questions are not related. In this one I need to periodically test several email alliases that the company has set up. We found that the web administartor (another company) had inadvertantly killed a couple of the many email aliases. We are just attempting to test these periodically.

I did not have a path to msinfo32 but I will begin testing today. Running from the command line gives a pop up window. I have not yet been able to generate a report on disk

I also have not been able to locate the map command. I assume map.exe. A search of the system did not turn up this file and command line queries returned nothing. Can you let me know what the path is to the map command?

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 86

Expert Comment

ID: 12171714
>>I did not have a path to msinfo32

Try winmsd as an alias for msinfo32.

Accepted Solution

zamoti earned 1500 total points
ID: 12174458
I found one that is probably more what your looking for:

fsutil fsinfo drives

All one command.  Yeah, that does it.  

C:\>fsutil fsinfo drives

Drives: A:\ C:\ D:\ E:\ F:\ G:\ I:\ L:\ M:\ N:\ O:\ P:\ R:\ X:\ Z:\

Author Comment

ID: 12174629

Although I need the names of only local devices the fsutil command with the "fsinfo drivetype" parameters will allow me to determine if the device is local or remote. I can add logic for this in my batch file. This will get me what I am looking for.

Thank muchly

Happy computing



Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ok I have been working on this for some time having learned and gained certification in XenDesktop 4 along came version 5 which was released last month. Since then I have been working to deploy XenDesktop 5 in a small environment with only 2 virt…
Step by step guide to Clean and Sort your windows registry! Introduction: Always remember: A Clean registry = Better performance = Save your invaluable time In this article we're going to clear our registry manually! Yes, manually! The e…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question