home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.msdos.programmer
- Path: sparky!uunet!caen!destroyer!ubc-cs!yogi
- From: yogi@cs.ubc.ca (Yossi Gil)
- Subject: Re: Another MsDos batch programming challenge
- Message-ID: <1992Sep13.194215.24100@cs.ubc.ca>
- Sender: usenet@cs.ubc.ca (Usenet News)
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- References: <1992Aug29.063552.26386@uwasa.fi> <1992Aug29.152816.14977@cs.ubc.ca> <FRDQB0DG@dri.com>
- Date: Sun, 13 Sep 92 19:42:15 GMT
- Lines: 38
-
- >>
- >>cd >> %0
- >>echo echo %%set%% >> %0
- >>set set=^Z
- >>
- >>(The above should be invoked with the .BAT extension. It should
- >>be quite easy to remove this restriction)
-
- >This is very clever but doesn't its self-modifying behavior cause it
- >to fail after one use? (The location of the end-of-file marker, ^Z,
-
- This is my own way of abusing the contest rules...
-
- >is important in your scenario.) And wouldn't CD be a better environment
- >variable name than SET? In any case, I can't come up with something
-
- Who says it has to be clear?
-
- >that works even once! :-(
-
- If you really care you could wrap it so that it could be invoked
- several times. But even so, this is not the remedy of all batch file
- problems. One has to use 4DOS or write a real program for all the
- serious stuff. Batch file tricks are just like three-legged races.
- Slow, funny and cumbersome yet challenging and sometimes even
- quite funny.
-
- >--
- >Jimmy Liberato liberato@dri.com
- > ...uunet!drivax!liberato
-
-
-
- --
- Joseph (Yossi) Gil {alberta,uw-beaver,uunet}!ubc-cs!yogi
- Dept. of Computer Science yogi@cs.ubc.ca (cs.ubc.ca=137.82.8.5)
- 6356 Agricultural Road., Univ. of B.C., Tel: +1-604-822-8175
- Vancouver, British Columbia, V6T 1Z2, Canada. Fax: +1-604-822-5485
-