Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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

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).

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 \

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...

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.

![]() |
Trouble with 5.25
|
Escape Sequence
|

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