Batch File timing / HttpRequest problem

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
kawise

Batch File timing / HttpRequest problem

Post by kawise » Mon Jan 05, 2004 7:19 am

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

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Mon Jan 05, 2004 9:29 am

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
MJT Net Support
[email protected]

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts