Computing.Net > Forums > Programming > Batch file to find drive letter

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Batch file to find drive letter

Reply to Message Icon

Name: JordanVash
Date: July 11, 2007 at 13:30:04 Pacific
OS: XP
CPU/Ram: 2gig
Comment:

How would i go about from executing a batch file that finds your primary drive letter. Its like %SystemDrive%. But how would i execute that so it echo's it back to me?



Sponsored Link
Ads by Google

Response Number 1
Name: tonysathre
Date: July 11, 2007 at 14:32:54 Pacific
Reply:

Everything you need is in your post.

@echo off
Echo You primary drive is %systemdrive%
pause


"Computer security." — Oxymoron


0

Response Number 2
Name: JordanVash
Date: July 11, 2007 at 17:41:08 Pacific
Reply:

not what i meant , how do i GOTO that drive if its not C:\

i cant cd\ to it.


0

Response Number 3
Name: Guy
Date: July 11, 2007 at 18:08:09 Pacific
Reply:

If you have e.g. E:, you just issue the command:

E:

that 'logs you to E:'.

Then you can 'cd' around that drive all you want.

That help?


0

Response Number 4
Name: tonysathre
Date: July 11, 2007 at 23:38:36 Pacific
Reply:

Or

cd /d drive:\path

"Computer security." — Oxymoron


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Batch file to find drive letter

Batch File to find files www.computing.net/answers/programming/batch-file-to-find-files/17076.html

Batch file to find ip and host name, and save www.computing.net/answers/programming/batch-file-to-find-ip-and-host-name-and-save/19455.html

batch file to find and copy www.computing.net/answers/programming/batch-file-to-find-and-copy/9236.html