[arachne] Re: Maximum length of PATH
- From: "Udo Kuhnt" <048321887-0001@xxxxxxxxxxx>
- To: arachne@xxxxxxxxxxxxx
- Date: Tue, 28 Nov 2006 14:12:37 +0000
Arachne at FreeLists---The Arachne Fan Club!
>> The result of issuing "path" at command line then appends
>> c:\myapps to the list above
> No, it rewrites the path variable. The end result is the same, but the
> whole line has to be put into the command buffer before the PATH
> variable can be rewritten.
>> And how long could you make the PATH variable before it went
>> wrong?
> In MSDOS 7 I found I could enter up to 1023 characters from the
> keyboard, or from a batch file, or from env variables, but at
> character #1024 it would bomb out and give me the "bad command or
> filename" error message.
Hi all,
Greg is right; at least in DR-DOS all environment variables are expanded
to their full content before the command line is interpreted, so the
command line limit always applies.
However, there is a second limit that nobody on this list seems to be
aware of: Since PATH is an environment variable, its length is also
limited by the size of the environment space. So if you have set /E:384,
then all environment variables together cannot become larger than 384 B.
But it is rather interesting to read that MS-DOS 7 uses a much larger
command line buffer. I always thought that 128 characters is too
short, particularly when running programs that had originally been
developed for Unix.
Regards,
Udo
-- The DR-DOS/OpenDOS Enhancement Project - http://www.drdosprojects.de
-- This mail was written by a user of The Arachne Browser - http://arachne.cz/
Arachne at FreeLists
-- Arachne, The Premier GPL Web Browser/Suite for DOS --
Other related posts: