home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / msdos / misc / 4849 < prev    next >
Encoding:
Text File  |  1992-08-22  |  1.3 KB  |  37 lines

  1. Newsgroups: comp.os.msdos.misc
  2. Path: sparky!uunet!gumby!destroyer!gatech!taco!dspascha
  3. From: dspascha@eos.ncsu.edu (DAVID SCOTT PASCHAL)
  4. Subject: Re: DOS environment variables > 128 chars ?
  5. Message-ID: <1992Aug22.193938.24641@ncsu.edu>
  6. Originator: dspascha@c00083-100lez.eos.ncsu.edu
  7. Keywords: environment variable DOS MS-DOS
  8. Lines: 22
  9. Sender: news@ncsu.edu (USENET News System)
  10. Reply-To: dspascha@eos.ncsu.edu (DAVID SCOTT PASCHAL)
  11. Organization: North Carolina State University, Project Eos
  12. References:  <1992Aug22.005943.26092@pasteur.Berkeley.EDU>
  13. Date: Sat, 22 Aug 1992 19:39:38 GMT
  14.  
  15.  
  16. Hi.  The only reason environment variables are "limited" to 128 characters is
  17. because of COMMAND.COM's 128-character limitation for command lines, which is
  18. based on DOS's 128-character limitation for passing command-line parameters to
  19. child processes.  Except for what you mentioned, the only problem I can forsee
  20. with using too-long environment variables is when you put a line in a batch file
  21. that references environment variables, such as:
  22.  
  23. @echo off
  24. set oldpath=%path%
  25. path c:\new.dir\to.add\to.path;%path%
  26. .
  27. . (do something)
  28. .
  29. path %oldpath%
  30.  
  31. When COMMAND.COM expands lines contining %variable% or %number, any characters
  32. past the 128th or so are truncated.  Thus, you will lose part of your PATH in
  33. the fragment above!
  34.  
  35. Tschuess,
  36. David Paschal
  37.