Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Capture error output from PkZip25
Message
From
21/10/2005 13:22:07
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Capture error output from PkZip25
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Miscellaneous
Thread ID:
01061161
Message ID:
01061161
Views:
88
I have a couple of apps (literally a couple - they are coupled!) to backup the SQL database on the server and restore it on the other server. To move the .bak file across the wire, I zip it using the good old pkzip25. Now since this pair of apps runs unattended, I need extensive logging and error checking - which works for most of the stuff, except that I can't catch any errors while zipping or unzipping.

I'm generating a batch file, with all the proper long filenames, and running it vie Ed Rauh's Api_AppRun class. Now the classic way to capture output from a DOS-style command is to add " >some.log" at its end. So far so good - it does capture the stdout output. But errors go to stderr, and that is not captured at all.

So far my only way is to issue
pkzip25 -test the.zip >the.log
and check if there's an "OK" at the end of the last line of the.log. The text
PKZIP: (W4) Warning! file fails

PKZIP: (E9) No file(s) found
is lost to me.

Is there any way to redirect the stderr into a file as well?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Next
Reply
Map
View

Click here to load this message in the networking platform