Article View: comp.os.msdos.programmer
Article #1278Re: Another MsDos batch programming challenge
From: Yossi Gil
Date: Fri, 04 Sep 1992 08:49
Date: Fri, 04 Sep 1992 08:49
23 lines
1426 bytes
1426 bytes
ts@uwasa.fi (Timo Salmi) writes:
>In article <1992Sep4.032836.7299@cs.ubc.ca> yogi@cs.ubc.ca (Yossi Gil) writes:
>>Yes, I tested it. It works. It relies on the way DOS does batch file:
>When I put as you suggested
> cd >> %0
> echo echo %%set%% >> %0
> set set=^Z
>into foo.bat and then type foo.bat and then check with set,
>nothing. What obvious am I missing?
The ^Z is an "End of File". The first statement modifies the third to
be
set set=CURRENT DIRECTORY
and the second statement creates a fourth statement which would echo
the environment variable "set".
--
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
Technical Details
Message-ID:
<1992Sep4.084939.13991@cs.ubc.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!wupost!gumby!destroyer!ubc-cs!yogiReferences:
<israel.715477510@unixg.ubc.ca> <1992Sep3.214401.5000@uwasa.fi> <1992Sep4.032836.7299@cs.ubc.ca> <1992Sep4.043254.11163@uwasa.fi>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!gumby!destroyer!ubc-cs!yogi From: yogi@cs.ubc.ca (Yossi Gil) Subject: Re: Another MsDos batch programming challenge Message-ID: <1992Sep4.084939.13991@cs.ubc.ca> Sender: usenet@cs.ubc.ca (Usenet News) Organization: Computer Science, University of B.C., Vancouver, B.C., Canada References: <israel.715477510@unixg.ubc.ca> <1992Sep3.214401.5000@uwasa.fi> <1992Sep4.032836.7299@cs.ubc.ca> <1992Sep4.043254.11163@uwasa.fi> Date: Fri, 4 Sep 92 08:49:39 GMT Lines: 23