Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows FTP Script

Status
Not open for further replies.

kwj1027

IS-IT--Management
Aug 10, 2004
28
US
Good afternoon all and thank you for your time.

I have a system where a test process triggers the execution of a batch file that automatically generates an ftp script and subsequently executes and ftp session to 'put' the results of the test on a remote AS/400.

Everything works fine, for the most part but I need to be able to verify that the file gets there and if not, issue the 'put' command again.

Is there anyway to read the FTP return codes into a batch file, or within the ftp script and if an error occurs loop back through?

Thank you in advance for your assistance.

Regards,

Kevin
 
Hello kwj1027,

[1] I would suggest you identify a signature message indicating the failure of the critical step. This would not be difficult given you're the author of the procedure. Just for instance off-hand, "Not connected." be an example.

[2] Run the ftp script through a .vbs Using wscript.shell's exec method to capture the stdout text.

[3] Determine if the signature is in the stdout text meaning some critical step went wrong.

[4] If indeed, re-run the corresponding steps within the .vbs to make it good or salvage what can salvage.

This is the general idea you can look into.

regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top