Article View: comp.os.msdos.programmer
Article #1028Re: Batch programming puzzle
From: Robert B. Israel
Date: Wed, 19 Aug 1992 23:05
Date: Wed, 19 Aug 1992 23:05
17 lines
1046 bytes
1046 bytes
Here's another approach, which works in versions of DOS from 2.1 to 5
(tricks like echo.ext and appending to a batch file while it's
running do not).
del &&temp1.*
REM better not have any files you want to keep with this name!
copy %1 &&temp1.*
dir &&temp1.* | find "&&TEMP1" > &&temp2.bat
echo set ext=%%1 > &&temp1.bat
echo del &&temp?.* >>&&temp1.bat
&&temp2
--
Robert Israel israel@math.ubc.ca
Department of Mathematics or israel@unixg.ubc.ca
University of British Columbia
Vancouver, BC, Canada V6T 1Y4
Technical Details
Message-ID:
<israel.714265510@unixg.ubc.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!destroyer!ubc-cs!unixg.ubc.ca!unixg.ubc.ca!israelShow Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!destroyer!ubc-cs!unixg.ubc.ca!unixg.ubc.ca!israel From: israel@unixg.ubc.ca (Robert B. Israel) Subject: Re: Batch programming puzzle Message-ID: <israel.714265510@unixg.ubc.ca> Sender: news@unixg.ubc.ca (Usenet News Maintenance) Nntp-Posting-Host: unixg.ubc.ca Organization: University of British Columbia, Vancouver, B.C., Canada Date: Wed, 19 Aug 1992 23:05:10 GMT Lines: 17