Windows batch drive


















You are commenting using your WordPress. You are commenting using your Google account. You are commenting using your Twitter account. You are commenting using your Facebook account. Notify me of new comments via email.

Notify me of new posts via email. This site uses Akismet to reduce spam. Learn how your comment data is processed. Skip to content. Nope, I misunderstood the question. I thought that you only wanted mapped drives.

I will edit. The wmic solution should give you everything. You need to remove the quotes from wmic logicaldisk get "caption,providername,drivetype" so that it is wmic logicaldisk get caption,providername,drivetype other wise it throws an error. EBGreen you have single handedly blown my mind for the day, I have never seen wmic even though I have been scripting various server builds for weeks and I am extremely excited to see what else I can do with it.

Great job! Thanks — Chris Magnuson. Show 7 more comments. To use diskpart, there is no need to create an intermediate file. Try: echo list volume diskpart.

This is the best answer and returns the most info about the mounted drives in a beautiful format. Although a little complex. Dharma Leonardi Dharma Leonardi 2 2 silver badges 6 6 bronze badges. Sorry, you need to put this in the beginning of the batch file. I've edited your answer to include the missing line.

It works now. No need to have admin rights. Geoleven 3 4 4 bronze badges. Yuning Yuning 1 1 silver badge 3 3 bronze badges. Jader Dias Jader Dias 4, 17 17 gold badges 47 47 silver badges 50 50 bronze badges. David Tr David Tr 21 1 1 bronze badge. I tried this one and it didn't work. I put the above in a file, d.

Nick Nick 11 1 1 bronze badge. Nexus Nexus 1 1 gold badge 8 8 silver badges 19 19 bronze badges. Mingjiang Shi Mingjiang Shi 2 2 bronze badges. John Leehey John Leehey I'm trying to configure the geany editor to compile my java file even if im on usb. Anyways your answer is perfect and I will accept your answer as soon as i can. It is the folder the program is executing from , not the folder the program is in.

Windows mangles the run path if you drag and drop a file onto a script or exe to give it as argument to that program. Show 4 more comments. Community Bot 1 1 1 silver badge. Kai K. Not true ewall : parameter 0 always retains the directory of the batch file location - which may not be the current working directory if someone called the batch file from another drive.

Even calling a batch file with a fully qualified pathname does not change the current working directory to that path. Alex Peters Alex Peters 2, 1 1 gold badge 17 17 silver badges 26 26 bronze badges.

You can find all USB drive letters from any drive with this. Ashish Namdev Ashish Namdev 9 2 2 bronze badges. Ste Ste 1, 1 1 gold badge 10 10 silver badges 21 21 bronze badges. Echo Excel, Word JollyChollie JollyChollie 9 2 2 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown.



0コメント

  • 1000 / 1000