Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

How to automatically find the drive letter of a removable mass storage device?

$
0
0
I'm trying to figure out how to find the drive letter of my usb so that I can use it in a batch file. I don't want to change the drive letter, I just want it to detect the drive letter as it can change when I use it in another computer. How can I do this? The code is just a test for myself as I am learning DOS, all it does is dir<every letter of the alphabet> and output each one in a separate file on my usb which is drive Z:. On the other computer I use, the drive is registered with the letter D:, so I just want to e able to run the batch file and let that deal with finding the usb drive letter without the need for manual editing.

Viewing all articles
Browse latest Browse all 15028

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>