Board index » delphi » please help - create a batch file to create folders

please help - create a batch file to create folders

JRS:  In article <3+4RTETC2jy5E...@merlyn.demon.co.uk> of Thu, 21 Sep
2000 17:55:30 seen in news:comp.archives.msdos.d, Dr John Stockton

Quote
<s...@merlyn.demon.co.uk> wrote:
>...
>Timo: if P treats its whole command-line as RPN, including @filename,
>something powerful could readily be achieved, ISTM.  H'mm - if my
>longcalc.pas could read & write environment items ... or is there a TS
>program which just writes the "word" on standard input to the EnvVar of
>its first parameter?  Fx: BP7.  From today's date, longcalc includes
>GetEnv, and is ready for a PutEnv which ISTR TS has in TSPA?? ...

TSPAS357C.ZIP fetched from Demon's Garbo mirror, TSUntEnv.TPU extracted,
SetEnv & SetEnvSH inserted into longcalc.pas; OK so far.  A bit more
work is needed in longcalc.pas to make it easier to generate useful
strings to set.

Presumably SetEnvSH operates on the environment of the Pascal program
(not just of shells from it), and SetEnv on that of its parent.

XP c.a.m.d, c.l.p.b; FU c.l.p.b !

Any chance of a TSUntEnv.TPP (* or even *.DCU for D3 ! *) ?

--
? John Stockton, Surrey, UK.  j...@merlyn.demon.co.uk   Turnpike v4.00   MIME. ?
 <URL: http://www.jibbering.com/faq/> FAQ for comp.lang.javascript by Jim Ley.
 <URL: http://www.merlyn.demon.co.uk/js-dates.htm>  Javascript dates, sources.
 <URL: http://www.merlyn.demon.co.uk/> TP/BP/Delphi/JS/&c., FAQ topics, links.

 

Re:please help - create a batch file to create folders


In article <Dayc6yToPny5E...@merlyn.demon.co.uk>,
Dr John Stockton  <j...@merlyn.demon.co.uk> wrote:
:TSPAS357C.ZIP fetched from Demon's Garbo mirror, TSUntEnv.TPU extracted,

:Any chance of a TSUntEnv.TPP (* or even *.DCU for D3 ! *) ?

Hi John,

Not enough motivation at the moment for my TP utilities and FAQ
updating in any extensive way. I have lately been concentrating my
efforts more on the WWW pages and procmail scene as well as on
digital photography

Timo's  FAQ  materials  at   http://www.uwasa.fi/~ts/http/tsfaq.html
Timo's  procmail tips at  http://www.uwasa.fi/~ts/info/proctips.html
Digital photos collection at http://www.uwasa.fi/ktt/lasktoim/photo/

   All the best, Timo

--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance  ; University of Vaasa
mailto:t...@uwasa.fi <http://www.uwasa.fi/~ts/>  ; FIN-65101,  Finland

Re:please help - create a batch file to create folders


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)

Other Threads