From: Dom Ciccotto
The following has been a nagging problem.
How to update a string (taken from the ASK function) which has
variables built into it.
I hope the following makes sense.
It is the outline of a macro which I use to perform many tasks against
a list of NT workstations/servers.
============================================
proc main
EditFile() <--- a Load the list of stations
end
What I do
=======
I get a station name and store it to STATION and rSTATION
(rSTATION= "\\"+STATION+"\")
The Task Menu is then used to Turn on/off things like:
Check Backup Logs, Check Time/Date on "Key" files,
Running command line utils substituting in the station name ....etc.
What I have not been able to do.
======================
If I Hit and choose "Run a DOS Command Line Against
the Station List. The only way I've been able to do it is.
ASK( "Enter Your PRE-Station Command : ", PreStationCommand )
ASK( "Enter Your Post-Station Command : ", PostStationCommand )
Then when I Hit it loops the list running
DOS( PreStationCommand+" " + rSTATION + PostStationCommand)
Simple example:
PreStationCommand="DIR" PostStationCommand= "C$\*.*"
HOW CAN I TYPE SOMETHING IN ASK() AND HAVE IT UPDATE
In early DOS programs it was called Macro Substitution and used a "&".
The command string would be Command="DIR &STATION\C$\*.*"
and then the program would run DOS(Command)
Dom Ciccotto
---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)
|