home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / msdos / programm / 9051 < prev    next >
Encoding:
Text File  |  1992-09-03  |  1.4 KB  |  35 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!wupost!gumby!destroyer!ubc-cs!yogi
  3. From: yogi@cs.ubc.ca (Yossi Gil)
  4. Subject: Re: Another MsDos batch programming challenge
  5. Message-ID: <1992Sep4.084939.13991@cs.ubc.ca>
  6. Sender: usenet@cs.ubc.ca (Usenet News)
  7. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  8. References: <israel.715477510@unixg.ubc.ca> <1992Sep3.214401.5000@uwasa.fi> <1992Sep4.032836.7299@cs.ubc.ca> <1992Sep4.043254.11163@uwasa.fi>
  9. Date: Fri, 4 Sep 92 08:49:39 GMT
  10. Lines: 23
  11.  
  12. ts@uwasa.fi (Timo Salmi) writes:
  13.  
  14. >In article <1992Sep4.032836.7299@cs.ubc.ca> yogi@cs.ubc.ca (Yossi Gil) writes:
  15. >>Yes, I tested it. It works. It relies on the way DOS does batch file:
  16.  
  17. >When I put as you suggested
  18. > cd >> %0
  19. > echo echo %%set%% >> %0
  20. > set set=^Z
  21. >into foo.bat and then type foo.bat and then check with set,
  22. >nothing.  What obvious am I missing?
  23.  
  24. The ^Z is an "End of File". The first statement modifies the third to
  25. be 
  26.     set set=CURRENT DIRECTORY  
  27. and the second statement creates a fourth statement which would echo
  28. the environment variable "set".
  29.  
  30. --
  31. Joseph (Yossi) Gil                 {alberta,uw-beaver,uunet}!ubc-cs!yogi
  32. Dept. of Computer Science          yogi@cs.ubc.ca (cs.ubc.ca=137.82.8.5)
  33. 6356 Agricultural Road., Univ. of B.C.,             Tel: +1-604-822-8175
  34. Vancouver, British Columbia, V6T 1Z2, Canada.       Fax: +1-604-822-5485
  35.