redirect output of program run with shell command 
Author Message
 redirect output of program run with shell command

Trying to capture the output of a java program invoked via the shell
command. If I run it from a dos window like:

        java jess.Main examples\fullmab.clp > mab.out

its output is saved in the file.

If I do a:

        Shell("java jess.Main examples\fullmab.clp > mab.out", vbNormalFocus)

the program runs, but the output file is not created. Tried different
window options.

thanks for any suggestions
Joe



Fri, 17 May 2002 03:00:00 GMT  
 redirect output of program run with shell command
Joe

Try:

Shell Environ("comspec") & " /c java jess.Main examples\fullmab.clp > mab.out",
vbNormalFocus

John........

Quote:

> Trying to capture the output of a java program invoked via the shell
> command. If I run it from a dos window like:

>         java jess.Main examples\fullmab.clp > mab.out

> its output is saved in the file.

> If I do a:

>         Shell("java jess.Main examples\fullmab.clp > mab.out", vbNormalFocus)

> the program runs, but the output file is not created. Tried different
> window options.

> thanks for any suggestions
> Joe



Sat, 18 May 2002 03:00:00 GMT  
 redirect output of program run with shell command
Create a batch file and do a Shell excecute on the batch file.

Kevin

Quote:

>Trying to capture the output of a java program invoked via the shell
>command. If I run it from a dos window like:

>    java jess.Main examples\fullmab.clp > mab.out

>its output is saved in the file.

>If I do a:

>    Shell("java jess.Main examples\fullmab.clp > mab.out", vbNormalFocus)

>the program runs, but the output file is not created. Tried different
>window options.

>thanks for any suggestions
>Joe



Sat, 18 May 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

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

2. Please help: redirecting output of shell started program

3. Redirecting run command line output from VBScript

4. Running shell command and recording output

5. Redirected Output From DOS Shell In Visual Basic 6

6. shell with dos tool output redirected to a file

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

8. Redirecting output from a SHELLed DOS Box

9. Redirecting output with Shell

10. Redirecting output in a shell (VB5)

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

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

 

 
Powered by phpBB® Forum Software