Which files contains the search path under DOS?

NogginBoink

Diamond Member
Feb 17, 2002
5,322
0
0
The search path is an environment variable, not a file.

Are you really running under DOS, or are you running a different OS? Setting the environment variable is done differently in different OSes.
 

Clemson

Member
Nov 10, 2001
30
0
0
Ok. I've done it before in UNIX and the path was a file that you could edit. I
thought it was saved in a file when I was using win95. Now I'm using W2k.
I just saw that I need to use the %PATH% to append to it.

Thanks for you help,
J
 

YNos

Member
Jan 7, 2002
84
0
0
man, this brings up some old memories.....
the file is autoexec.bat...here is how you put your path togather

path c:\dos;c:\windows\command;c:\windows;c:\whatever\the\path;

what dos are you using btw? i am more a fan of
Freedos
ahh the days of aui networking....how i <dont> miss thee
Craig Ynos
 

NogginBoink

Diamond Member
Feb 17, 2002
5,322
0
0
Under windows 2000, the "path" system enviroment variable can be set in the System control panel.
 

Clemson

Member
Nov 10, 2001
30
0
0
Cool. I'll use the control panel method since that seems to be the easiest.
I used the command

path c:\blah\blah;%PATH%

and it appended the new path, but when I restarted the DOS prompt window it erased it. Why?

Thanks
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0


<< Cool. I'll use the control panel method since that seems to be the easiest.
I used the command

path c:\blah\blah;%PATH%

and it appended the new path, but when I restarted the DOS prompt window it erased it. Why?

Thanks
>>



Thats a temporary fix. The fix is only recorded for that once instance of the cmd shell. To make it permenant it would have to be resident in the registry or where ever Windows keeps it in win2k. Very similar to UNIX. You can change it in your .cshrc/.profile/.bash_profile/etc but that will become active next time you login, and you can change it by setting the $PATH variable (export PATH=$PATH:/new/path, setenv PATH $PATH:/new/path) which will only change the current session.
 

Clemson

Member
Nov 10, 2001
30
0
0
Thanks, I got it to work. I needed to set the path
because I want to play around with Apache's
Xalan program for XML.