No matter where I am in the system, I want to be able to execute my .bat
files that are located in the C:\BATCH directory.
I tried using the PATH command at the C: prompt. I typed PATH
C:\BATCH:%PATH%
It appeared to append my C:\BATCH directory becuase when I typed the command
BATCH...it did appear there. However, when I tried to execute some of my
customized .BAT files....it couldn't find them.
I also noticed that the next time I started DOS....that the PATH to C:\BATCH
was no longer there.
Any help would be appreciated.
Your PATH is probably set in AUTOEXEC.BAT. Simply edit that file to include
the additional path to your batch files.
Hi pcmdc,
On that special day, pcmdc, (pc...@bigfoot.com) said...
> No matter where I am in the system, I want to be able to execute my .bat
> files that are located in the C:\BATCH directory.
If you don't want to edit your autoexec.bat, you can write on the command
line.
SET Path=%PATH%;C:\BATCH
That should do the job. HTH,
Gabriele Neukam
--
"Mom, there is a spider in the bathroom!"
"Are you sure?" - "Yes!"
"How many legs has it got?"
"I can't tell - but they are all dangling from a thread!" (c): RL
Don't change your path spec from a DOS window. When you open a DOS window,
it gets a *copy* of the DOS environment, and your path manipulation is only
affecting that DOS session, which disappears when you close the window.
To make your change stick, edit the c:\autoexec.bat file.
The problem is...
You used a colon for the separator.
PATH C:\BATCH:%PATH%
should be PATH C:\BATCH;%PATH%
To explain this problem better...
Since DOS allows setting nonexistent or invalid paths, in effect, the first
pointer in %path% was severed by using the colon as your separator.
If say, path contained,
c:\windows;c:\windows\command
then it would have become,
c:\batch:c:\windows;c:\windows\command
so "c:\windows" is now "c:\batch:c:\windows" which is invalid.
If you want this to be a permanent setting, as others have mentioned, place
the correct command in your autoexec.bat file.
--
Todd Vargo (body of message must contain my name to reply by email)