Please help: redirecting output of shell started program 
Author Message
 Please help: redirecting output of shell started program

Again I'm stuck with part of my proggy: I can't find a relyable way of
redirecting the output of pkunzip's filetest option to a textfile. Since it
runs asynchronously, it seems to be impossible to force
RetVar=Shell("pkunzip -t myfile.zip >output.txt") to put something on
harddisk. Somebody mentioned to use Shell(Environ$("comspec"), which I
couldn't find in any documentation. Since this is nearly the last unsolved
problem, and since I need this feature urgendly - Can somebody show me a
reliable way to gt my textfile output done?

Thanks,

M. Bergmann



Thu, 18 Oct 2001 03:00:00 GMT  
 Please help: redirecting output of shell started program
Example :
Shell Environ("COMSPEC") + " /C DIR C:\*.* >C:\out.txt"

Shell : This is the command to execute a external program
Environ ("COMSPEC") : This will return "C:\Command.com" (The actual
Commandprocessor)
" /C " : This will tell Command.COm (or cmd.exe) to execute the command
and return
" DIR C:\*.* >C:\Out.txt" : Is an example Doscommand : result in Out.txt

Replace it with your command (pkunzip -t myfile.zip >output.txt)

I hope, this will solve your problem.

Michael Bergmann schrieb:

Quote:

> Again I'm stuck with part of my proggy: I can't find a relyable way of
> redirecting the output of pkunzip's filetest option to a textfile. Since it
> runs asynchronously, it seems to be impossible to force
> RetVar=Shell("pkunzip -t myfile.zip >output.txt") to put something on
> harddisk. Somebody mentioned to use Shell(Environ$("comspec"), which I
> couldn't find in any documentation. Since this is nearly the last unsolved
> problem, and since I need this feature urgendly - Can somebody show me a
> reliable way to gt my textfile output done?

> Thanks,

> M. Bergmann



Sun, 21 Oct 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Probs with redirecting output of a shell started DOS-App to a file

2. redirect output of program run with shell command

3. Redirected Output From DOS Shell In Visual Basic 6

4. shell with dos tool output redirected to a file

5. Redirecting output from a SHELLed DOS Box

6. Redirecting output with Shell

7. Redirecting output in a shell (VB5)

8. using shell to exec dos app and redirect it's output

9. VB4, WIN95: Redirecting output of a shelled process

10. Shell redirect to standard output not working

11. VB4 - problem creating text from redirected output of shell command

12. redirecting program output

 

 
Powered by phpBB® Forum Software