Computing.Net > Forums > Disk Operating System > Path help

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.

Path help

Reply to Message Icon

Name: kebabs
Date: August 16, 2004 at 19:46:27 Pacific
OS: ms-dos 6.22
CPU/Ram: p100/64meg
Comment:

Hi,
Is it possible to have mor ethan 1 path
statement in Autoexec.bat?
I use aurora v1.6 and the path is:
c:\dos;c:\aurora
I also have a yahtzee game with the path:
c:\dos;c:\yahtzee
but i have to rem one of them out to use
the other in a different folder.
can anyone help?
if you need any other info let me know.
cheers



Sponsored Link
Ads by Google

Response Number 1
Name: jboy
Date: August 16, 2004 at 20:08:32 Pacific
Reply:

Possible but pointless - last statement processed becomes your path.

Don't see the problem - put the desired folders on the same path statement. DOS will search the path in that order until it finds the executable invoked (although first it checks the current directory).


Confusion reigns


0

Response Number 2
Name: Mechanix2Go
Date: August 17, 2004 at 02:46:55 Pacific
Reply:

Well, almost.

Problem is, if both directories have, for instance, a "start.bat" or other com exe bat with identical names, you'll never get to the second one.

Try this:
[y.bat]
cd \
cd \yahtzee
[your yahtzee program goes here]
cd \



0

Response Number 3
Name: dominicus
Date: August 17, 2004 at 06:10:52 Pacific
Reply:

You might want to take both out of the path, and add a set=app1 and set=app2 variable
instead.
Then make two batch files with the path to each of them specified...so that each batch file is kept in the root,switches to the proper directory, and opens the specified app.
If you have two programs with the same name .bat files..firstly, change the name of one of the batch files, and , if in the batch files they reference an exe with the same name (like start.exe or some such)..put the full path to each program in each batch file..have the batch file change to the drive that it's on (eg..C:) and then CD:\mydirectory
C:\mydirectory\mygame.exe
The only reason to have a dos program in the path is so as you can switch to it from any directory..with root-based batch files that include the path,you should be able to not need to include them in your path statement..
Basically, your using a batch file to open a batch file...


0

Response Number 4
Name: jboy
Date: August 17, 2004 at 06:19:43 Pacific
Reply:

Of course the desired directory can be navigated to first, or the full path can be invoked from the command line or from another batch file - even the executable can be renamed in the case of duplicate commands.

The path statement could be rewritten 'on the fly' using the %path% variable.

Plenty of workable options, depending on the specific problem.


Confusion reigns


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Trouble with 5.25 Escape Sequence



Post Locked

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


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Path help

DOS Path/File/Copy Help for Install www.computing.net/answers/dos/dos-pathfilecopy-help-for-install/3644.html

Dos registry path load (batch) www.computing.net/answers/dos/dos-registry-path-load-batch/15360.html

help me restore an old dos backup www.computing.net/answers/dos/help-me-restore-an-old-dos-backup/7540.html