
VB4, WIN95: Redirecting output of a shelled process
I'd like to capture the output of a shelled program
(in this case UNZIP.EXE). If I enter the following on
the command line, I get the desired results:
c:\zip\unzip -l file.zip > c:\zip\tempfile
Namely, unzip prints a list of the files archived in
file.zip, and the output is redirected into a file
called tempfile in the same directory.
If I enter use the same command as an argument for the
Shell function, the file is not created. Ditto if I use
the ExecCmd function created as described in Knowledge
Base Article ID Q129796, "How to Determine When a Shelled
32-bit Process Has Terminated" (I'm using unzip for Win32).
The unzip program does run.
I seek suggestions for how to make this work, including
suggestions for how I might better capture this output,
as text, in order to put the list into a List Box.