I have a script which invokes a dos batch file that sends a couple of files with secure transfer (scp) to a host. For some reason, the code keeps executing following the Run Program> line, even with RP_WAIT=1 -- while the DOS batch is still executing. So the HTTPRequest is getting called to early and a message displayed. I've tried creating a "senddone" file at the end of the batch file that will stop the processing, but no luck either. Any ideas on this would be a big help. I'm running on Windows XP Home.
Let>RP_DISPLAYERROR=0 'Suppress errors
Let>RP_WAIT=1 'Wait for script to terminate
Let>RP_WINDOWMODE=1
Run Program>TransmitFiles.bat
Label>WaitLoop
IfFileExists>senddone,HTTPCall,WaitLoop
Label>HTTPCall
HTTPRequest>http:///process.php,,POST,,HTMLResponse
Message>Posted
Batch File timing / HttpRequest problem
Moderators: JRL, Dorian (MJT support)
Change your script to:
Let>RP_DISPLAYERROR=0
Let>RP_WAIT=1
Let>RP_WINDOWMODE=1
Run Program>TransmitFiles.bat
Label>WaitLoop
IfFileExists>senddone,HTTPCall,WaitLoop
Label>HTTPCall
HTTPRequest>http:///process.php,,POST,,HTMLResponse
Message>Posted
Let>RP_DISPLAYERROR=0
Let>RP_WAIT=1
Let>RP_WINDOWMODE=1
Run Program>TransmitFiles.bat
Label>WaitLoop
IfFileExists>senddone,HTTPCall,WaitLoop
Label>HTTPCall
HTTPRequest>http:///process.php,,POST,,HTMLResponse
Message>Posted
MJT Net Support
[email protected]
[email protected]