home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / alt / msdos / programm / 3094 < prev    next >
Encoding:
Text File  |  1993-01-04  |  1.7 KB  |  39 lines

  1. Newsgroups: alt.msdos.programmer
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!uchinews!quads!pynq
  3. From: pynq@quads.uchicago.edu (Jeremy Mathers)
  4. Subject: Re: Help Required with Dos variables
  5. Message-ID: <1993Jan4.191855.9869@midway.uchicago.edu>
  6. Sender: news@uchinews.uchicago.edu (News System)
  7. Reply-To: pynq@midway.uchicago.edu
  8. Organization: D. J. Dougherty & Associates
  9. References: <1993Jan4.160029.26833@newton.ccs.tuns.ca> <babcock.12.0@cfa.harvard.edu>
  10. Date: Mon, 4 Jan 1993 19:18:55 GMT
  11. Lines: 26
  12.  
  13. In article <babcock.12.0@cfa.harvard.edu> babcock@cfa.harvard.edu (Robert W. Babcock) writes:
  14. >In article <1993Jan4.160029.26833@newton.ccs.tuns.ca> macdonak@newton.ccs.tuns.ca (Kevin MacDonald) writes:
  15. >
  16. >>Is there any way to display the contents of a single DOS variable?
  17. >>I know you can display all current variables by typing SET, but there
  18. >>doesn't appear to be any way to display variables individually.
  19. >
  20. >In a batch file you could do something like
  21. >  echo COMSPEC is %COMSPEC%
  22. >This can be redirected.
  23.  
  24. Well, no, in fact, it can't.  Batch file redirection doesn't work.
  25.  
  26. While conceding that the inability to reference env vars directly from
  27. the shell is a enormous omission on the part of the COMMAND.COM
  28. designers (& I can already hear the 4DOSers gathering up their voices),
  29. I have had good luck with:
  30.  
  31.     set | grep VARNAME
  32.  
  33. ************************************************************************
  34. If you didn't get caught, did you really do it?
  35.  
  36.     - pynq@quads.uchicago.edu, who is still costing the net
  37.       hundreds, if not thousands, of dollars, every time he posts -
  38. ************************************************************************
  39.