wzunzip

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
whorff

wzunzip

Post by whorff » Tue Mar 04, 2003 5:42 pm

Hi, I'm using a command line unzip program wzunzip.exe
When I run program>wzunzip.exe their are times when the zip file is invalid.
Is their away to catch the error?

Thanks
Frank

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Tue Mar 04, 2003 5:56 pm

Hi,

First - use RP_WAIT to make sure the Run Program command waits for the zip program to complete before the script continues.

To grab the result of the operation try piping the command output to a text file and then reading the text file in with ReadLn to analyse the results. Something like:

Let>RP_WAIT=1
Run>CMD.EXE /c wzunzip.exe zipfile ... etc etc >> c:\temp\zipoutput.txt
..
ReadLn>zipoutput.txt
.. etc etc

Use command.com instead of CMD.EXE if you are on Win9x

Hope this helps.
MJT Net Support
[email protected]

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Fri Mar 14, 2003 3:00 am

Hi Support,

I didn't know the RUN> command suports output redirection. Do it imply it also support other programs in addition to CMD.exe? Thanks for showing us a valuable scripting tip.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts