JRS: In article <8qdv0k$...@loisto.uwasa.fi> of Fri, 22 Sep 2000
00:36:20 seen in news:comp.archives.msdos.d, Timo Salmi <t...@UWasa.Fi>
wrote:
Quote
>In article <3+4RTETC2jy5E...@merlyn.demon.co.uk>,
>Dr John Stockton <j...@merlyn.demon.co.uk> wrote:
>:JRS: In article <3E3612E8D41DD3118DCC06000000000001FC0739@pubgate-01>
>:of Wed, 20 Sep 2000 13:30:44 seen in news:comp.archives.msdos.d, none
>:<n...@none.com> wrote:
>:>I need a batch file to automatically create folders. When i call the batch
>:If you MUST use batch, consider starting with your directory containing
>:See also Timo's ftp://garbo.uwasa.fi/pc/ts/tsbat61.zip
New TSBAT62.ZIP noted - #92. Will fetch & read.
Quote
>There are several examples in there how to use QBASIC as a
>batch-only solution for various tasks. This particular problem
>should be reasonably easily solvable adapting those techniques. How
>exactly, is left to the poser of the problem. The methods are in
>there.
Alas, AIUI more recent machines do not come with QBASIC. Borland
should donate Turbo Pascal 7 into Microsoft Windows instead; Pedt
could contribute crt.zip!
The following batch file will appropriately increment Environment
Variable X, writing it with five digits; uses longcalc.exe uploaded
late yesterday. Just space(s) between dup and (00000), no newline
( but "longcalc (script.fil) SCR" accepts multi-line scripts ); read it
as RPN, (...) are strings :
C:\HOMEPAGE\PROGRAMS>type env_incx.bat
longcalc (X) gnv val inc cof str 2 9 sbs dup
(00000) swp len inc 9 sbs swp cat dup wrt (X) pnv
A possible message "Out of memory, cannot set the environment variable"
presumably from SetEnvSH, can be ignored (* it would be nicer if it
started with a space, or was " * Out ..."; or if it returned Status *);
at present, "pnv", which invokes TS's SetEnv*, is only available in
longcalc compiled with TP7/BP7 in MSDOS mode (not DPMI, Delphi, TMT).
A Pascal program written specifically to do the environment increment
should be over an order of magnitude smaller in EXE, and two orders in
PAS, but it would omit other facilities such as the date of Easter, the
Ninth Fermat Number, and Pi to base 13. One should be able to script
longcalc to generate ISO-8601 Week Number, as was recently needed ...
yes, I think I've done it.
XP c.a.m.d, c.l.p.d
--
? John Stockton, Surrey, UK. j...@merlyn.demon.co.uk Turnpike v4.00 MIME. ?
Web <URL: http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper 4-line sig. separator is as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)