[comp.sys.ibm.pc] Path extension above 128 characters

cjveenm@cs.vu.nl (Veenman CJ) (03/15/90)

In article <1941@v7fs1.UUCP> sv@v7fs1.UUCP (Steve Verity) writes:
>
>I want to have a path that is almost 150 characters long.  Unfortunately,
>DOS truncates the path I specify in my autoexec, if it gets too long.
>
>There must be a work around, no?


I wrote a program for this purpose. The only path length limit is then 
caused by your environment size. (COMMAND.COM /E:xxxx)

Further possibillities:
	- appending directories to path;
	- deleting directories from path;

If wanted I can send a copy of this program (TP4.0 source).

			Cor.

jstone@world.std.com (Jeffrey R Stone) (03/16/90)

Steve Verity asked how to create a path string of 150 charaacters or
so.  I do it in my AUTOEXEC.BAT using batch file variables, as follows:

  SET PATH=c:\bin;c:\dos; ... <etc>
  SET PATH=%PATH%;d:\games;...<etc>
  SET PATH=%PATH%;<more stuff>

This should worlk til your environment is full.  I don't know whether
COMMAND.COM will choke on it before then.  I use a path of about 120
chars.

Hope this helps,

-jeff-

psm@manta.NOSC.MIL (Scot Mcintosh) (03/17/90)

In article <1990Mar16.123731.3224@world.std.com> jstone@world.std.com (Jeffrey R Stone) writes:
>Steve Verity asked how to create a path string of 150 charaacters or
>so.  I do it in my AUTOEXEC.BAT using batch file variables, as follows:
>
>  SET PATH=c:\bin;c:\dos; ... <etc>
>  SET PATH=%PATH%;d:\games;...<etc>
>  SET PATH=%PATH%;<more stuff>

I tried this in my MSDOS 3.3 with an environmental variable other than
PATH.  Attempting to add a piece that would take the variable beyond
128 resulted in no action being taken.  As far as I can see from
this experiment, 128 seems to be a hard limit.

-- 
----
Scot McIntosh
Internet: psm@helios.nosc.mil
UUCP:     {ihnp4,akgua,decvax,decwest,ucbvax}!sdscvax!nosc!psm

KDA101@psuvm.psu.edu (KeithPetto Alexander) (03/19/90)

In article <1990Mar16.123731.3224@world.std.com>, jstone@world.std.com (Jeffrey
R Stone) says:
>
>  SET PATH=c:\bin;c:\dos; ... <etc>
>  SET PATH=%PATH%;d:\games;...<etc>
>  SET PATH=%PATH%;<more stuff>
>
>This should worlk til your environment is full.  I don't know whether
>COMMAND.COM will choke on it before then.  I use a path of about 120
>chars.

Yes, COMMAND.COM chokes on this.  You only get a 128 character command
line.  Because %PATH% is replaced by your current path, DOS sees the
command as a full statement so this batch:

   SET PATH=C:\MENU
   SET PATH=%PATH%;C:\DOS

Looks like this to DOS:

   SET PATH=C:\MENU
   SET PATH=C:\MENU;C:\DOS

Therefore you don't get to input more than 128 characters.
                                       Petto :->

"You weren't like that before the beard."  -- Q

Petto is still an AI program run amuck, his opinions are the result
of a deranged program from a less deranged programmer.
kda101@psuvm.bitnet

tfabian@mars.lerc.nasa.gov (Ted Fabian) (03/20/90)

In article <1034@manta.NOSC.MIL> psm@manta.NOSC.MIL (Scot Mcintosh) writes:
>In article <1990Mar16.123731.3224@world.std.com> jstone@world.std.com (Jeffrey R Stone) writes:
>>Steve Verity asked how to create a path string of 150 charaacters or
>>so.  I do it in my AUTOEXEC.BAT using batch file variables, as follows:
>>
>>  SET PATH=c:\bin;c:\dos; ... <etc>
>>  SET PATH=%PATH%;d:\games;...<etc>
>>  SET PATH=%PATH%;<more stuff>
>
>I tried this in my MSDOS 3.3 with an environmental variable other than
>PATH.  Attempting to add a piece that would take the variable beyond
>128 resulted in no action being taken.  As far as I can see from
>this experiment, 128 seems to be a hard limit.
>
>-- 
>----
>Scot McIntosh
>Internet: psm@helios.nosc.mil
>UUCP:     {ihnp4,akgua,decvax,decwest,ucbvax}!sdscvax!nosc!psm




the real issue here is not the length of the PATH.. rather it's the amount
of environment space you've got allocated...  

as long as you don't load an RAM resident programs, you can use "ANY"
amount of environment space you want to.. which means any length path...

or you can use the /E switch on the SHELL command in your CONFIG.SYS
to define a larger default environment.. something like

   SHELL COMMAND.COM /E:1024


-- 
----------------------------------------------------
Thanks,    Ted Fabian   NASA Lewis Research Center
           tpfabian@nasamail.nasa.gov      *my opinions 
           tfabian@mars.lerc.nasa.gov      *are my own..
-- 
----------------------------------------------------
Thanks,    Ted Fabian   NASA Lewis Research Center
           tpfabian@nasamail.nasa.gov      *my opinions 
           tfabian@mars.lerc.nasa.gov      *are my own..

GILLA@QUCDN.QueensU.CA (Arnold G. Gill) (03/20/90)

In article <1990Mar20.014733.3747@eagle.lerc.nasa.gov>,
tfabian@mars.lerc.nasa.gov (Ted Fabian) says:
>
>the real issue here is not the length of the PATH.. rather it's the amount
>of environment space you've got allocated...
>
>as long as you don't load an RAM resident programs, you can use "ANY"
>amount of environment space you want to.. which means any length path...
>
>or you can use the /E switch on the SHELL command in your CONFIG.SYS
>to define a larger default environment.. something like
>
>   SHELL COMMAND.COM /E:1024
     In a word, nonsense.  I have exactly the above command in my CONFIG.SYS,
with no TSRs, and the PATH is still not capable of accepting more than 128
characters.  This is a MS-DOS defect, and if you have a fixed up version of
DOS, good for you.  Most of do not, and we have to work around this flaw by
writing directly to the environment.  Luckily, this is easy to do, as several
other postings have shown.
-------
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|  Arnold Gill                        |                                     |
|  Queen's University at Kingston     |     If I hadn't wanted it heard,    |
|  BITNET   : gilla@qucdn             |       I wouldn't have said it.      |
|  X-400    : Arnold.Gill@QueensU.CA  |                                     |
|  INTERNET : gilla@qucdn.queensu.ca  |                                     |
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

nol2321@dsacg2.dsac.dla.mil (Jim Dunn) (03/21/90)

Yes, the PATH environment is limited to 128 characters due to the fact that
DOS only allows you to type 128 characters on any ONE line.  (you can type the
following at the DOS prompt:
     C:\>rem lskjdlfskdjflskdjflskjdflksjdlfksjdlkfjsldkfjsldkjfslkdjflskdjflskjdflskjdflksjdlfksjdlkfjsldkfjsldkjflskdjflskdsldskdkd

But it will start beeping at you at this point, since the "line buffer" is
full, (if there is such a thing as a line buffer).
)

The following cmd in your config.sys:

     shell=c:\command.com /p /e:1024

will increase your environment space, but will NOT increase your LINE BUFFER,
OK?

Sorry.

I had to rename my subdirectories to shorter names.  Such as:

	c:\utility became c:\ut
	c:\nortons became c:\nu
	c:\nortcomm became c:\nc
	c:\procomm became c:\p
	c:\unixutil became c:\u
	etc...

This may seem a terrible thing to do, but you'll appreciate it later when you
don't have to type as many characters...

:)
later

davidsen@sixhub.UUCP (Wm E. Davidsen Jr) (03/25/90)

In article <1959@dsacg2.dsac.dla.mil> nol2321@dsacg2.dsac.dla.mil (Jim Dunn) writes:
| Yes, the PATH environment is limited to 128 characters due to the fact that
| DOS only allows you to type 128 characters on any ONE line.

  I have just posted one program to allow more than 128 bytes in the
PATH. I can't remember if there is one to go or if I already sent out
one earlier this month.

  bigpath, posted to c.b.i.p an hour ago.

  Oh yes, all of what you said about one line is true, but you can
diddle the stuff in the environment and make it longer. There's always
another way, right?
-- 
bill davidsen - davidsen@sixhub.uucp (uunet!crdgw1!sixhub!davidsen)
    sysop *IX BBS and Public Access UNIX
    moderator of comp.binaries.ibm.pc and 80386 mailing list
"Stupidity, like virtue, is its own reward" -me