You remember correctly, this is exactly how it's done. In which DOS version you are getting this behavior?
I can only think of an extreme scenario: the environmental variables size is at the absolute limit and everything past that gets truncated.
It is treating a variable (%path%) as a literal.
What binary understands that the % is not a literal?
Even pressing F5 and trying to change the path has the same result.
There is something fundamentally wrong.
I am wondering if the system files are messed up in some way.
DOS never did this %..% variable substitution in the interactive command line. It was only available in batch files, and the FOR command.
This is unlike NT's and 4DOS, I believe.
DOS never did this %..% variable substitution in the interactive command line. It was only available in batch files, and the FOR command.
This is unlike NT's and 4DOS, I believe.
Ah, that makes sense, cheers.
I did think it was my misunderstanding somewhere.
So how can I extend the PATH in DOS without retyping the whole path?
Maybe using echo? Or is there another way to accomplish the same?
Is there anything preventing you from editing autoexec.bat and rebooting?
Also your examples don't seem that long to type?
Is there anything preventing you from adding whatever you want to whichever batch file you want and running that file whenever you want?
Is there anything preventing you from editing autoexec.bat and rebooting?
Also your examples don't seem that long to type?
Is there anything preventing you from adding whatever you want to whichever batch file you want and running that file whenever you want?
They were just examples. It was an issue if the PATH became longer.
I was just looking for a way to make quick changes to the PATH without the reboot and did not want to re-invent the wheel by using the above batch file.
For some reason, I believed that it could be done via the command line.
EDPATHA Charles Petzold
Command
----------------------------
Purpose: Lets you edit the DOS PATH directly.
Format: […] Show full quote
EDPATHA Charles Petzold
Command
----------------------------
Purpose: Lets you edit the DOS PATH directly.
Format: [d:] [path] EDPATHA
Remarks:
When you type EDPATHA the cursor will drop down a line, but nothing
else will happen, At this point you can use the normal DOS editing tools
to edit the path. Pressing F3 will summon the entire existing PATH.
Using Fl or the Right Arrow key will write it to your screen character by
character. Press Enter when done to register your changes.
It goes on to explain how the program works. I didn't read it fully but apparently it sends a PATH=... command to COMMAND.COM itself to process.