Solved

Get list of local disk drives from batch script

Posted on 2004-09-28
6
943 Views
Last Modified: 2008-02-01
Greetings;

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

jvossler
0
Comment
Question by:jvossler
  • 2
  • 2
  • 2
6 Comments
 
LVL 3

Expert Comment

by:zamoti
Comment Utility
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.

0
 
LVL 86

Expert Comment

by:jkr
Comment Utility
'msinfo32.exe' can do that. Type 'msinfo32 /?' on the command line for more options. It should be like

msinfo32 /category ComponentsStorageDrives /report drives.txt
0
 

Author Comment

by:jvossler
Comment Utility
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?

jvossler
0
Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

 
LVL 86

Expert Comment

by:jkr
Comment Utility
>>I did not have a path to msinfo32

Try winmsd as an alias for msinfo32.
0
 
LVL 3

Accepted Solution

by:
zamoti earned 500 total points
Comment Utility
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:\
0
 

Author Comment

by:jvossler
Comment Utility
Zamoti

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

jvossler

 
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Most of the time we are in fix when all of sudden our systems behave weirdly.  Such problems cost time and effort... so it's best to take some preventive actions so that we can avoid such issues or overcome such problems more easily. Preventive M…
Sometimes people don't understand why download speed shows differently for Windows than Linux.Specially, this article covers and shows the solution for throughput difference for Windows than a Linux machine. For this, I arranged a test scenario.I…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now