FTP to second FTP server on Failure

Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
2 posts Page 1 of 1

crofte

Posts: 2
Joined: Mon Dec 05, 2011 8:18 am

Post by crofte » Wed Dec 07, 2011 1:59 pm
Can you create a project to FTP a file to a remote server, and if the project fails for any reason, (after a few retries) FTP to another FTP server

RElliott63

Posts: 14
Joined: Thu Jul 01, 2010 10:42 am

Post by RElliott63 » Fri Dec 09, 2011 5:30 pm
This could be easily done by either calling separate modules or reading a Spreadsheet or Database Table for your IP addresses:

Pseudo code for Calling separate modules (assuming you only have 2 IP Addresses):
Code: Select all
<Module Main <dependsOn=FTPMain,FTPAlternate>
   ...Print Success Message (If ftpError eq 0)
   ...Email Notification (If ftpError gt 0)
</Module>

<Module FTPMain>
   <setVariable label="Set ftpError" version="1.0" name="ftpError" value="0" />
   <FTP ResourceID=<1st IP Address> ..... onError="setVariable:ftpError=1">
   ...
   ...Do something if ftpError=0...
</Module>

<Module FTPAlternate executeOnlyIf="${ftpError} gt 0>
   <setVariable label="Set ftpError" version="1.0" name="ftpError" value="0" />
   <FTP ResourceID=<1st IP Address> ..... onError="setVariable:ftpError=1">
   ...
   ...Do something if ftpError=0...
</Module>
The Pseudo Code for reading the IP Addresses from a Spreadsheet or Database would entail your use of multiple projects.. using a callProject within a loop reading the records. If you need help with this, please let me know... I have some examples.

Hope this helps...

-Rick
2 posts Page 1 of 1