Shell-To and standard error
Posted
#1
(In Topic #1032)
Regular

Posted
Guru

JumpyVB said
First use 2>&1 in the shell command to redirect stderr to stdout then use Process.LastValue to check for error value in last run process
Code (gambas)
- ' First use 2>&1 to direct stderr to stdout
- ' there was an error value so display the output text and Return
- ' if error above then i did Return so if here there was no error and Stdout is no longer empty and should be a file list.
Note: only use this if using To or Wait with the Shell/Exec command so the process is not asynchronous and finishes before checking Process.LastValue or you may check the value of the previously run process.
Posted
Regular

1 guest and 0 members have just viewed this.


