[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: U2 Query: file locations



Robert Holmgren wrote:
Use WSH (VBS VisualBasicScript). A whole setup of it got dumped on your machine when you installed
your operating system. It's universal in Windows. Useful. Safe. Worthwhile.
Yes, you introduced me to that a year or so ago, and I've been playing with it. Routines for archiving data at the office, and I found a big book on it at a yard sale, though I haven't had time to do much.
FOR...DO is very powerful, especially nested FOR...DOs.
Yes, I recall FOR...DO from earlier batch language use.
Yes. I always use KMD.EXE for BATch files in 9x. You can't use tokens or
delimiters otherwise. You can't use counters. Take a look at U2UTL9x.BAT.
Aha! You're saying that the NT flavors have extensions to Batch language that aren't available in 9x? Where would I find those documented?
I know. This is 1980s stuff: pipe DEBUG commands into DEBUG.COM and write a
file. Here we write (">") a 9-byte BAT file that has no terminal carriage
return ("SET UTOO="), then we append (">>") a CD command to it, so the result
is "SET UTOO=D:\XY4{carriage return}" or whatever, on one line. Then we
perform a DO...FOR that first runs (CALLs, so that UTOO.BAT is treated as a
subroutine that returns to the parent on termination of its single line) the
BATfile (it SETs environment variable %UTOO%) and second DELetes the
UTOO.BATfile. It actually IS very simple!
Thanks for the explanation. Who was it said anything is simple if you know how it's done? This calling itself, then deleting itself, is what's called recursion, no? Neat idea.

Patricia M. Godfrey