4 Replies Latest reply on Mar 20, 2013 3:29 PM by Michael.J Wonder

    FDM FTP Functionality

    Michael.J Wonder
      Hello,

      As we know when click the export button FDM will export the txt and dat file to the output folder, in my situation we want to ftp this file to another server.

      So can i update the event script AftExportToDat and add some code there for the ftp function ? If yes, is there a sample code for this ? We need:

      1. Stop the export once the data was exported to the output folder, we do not need load action.
      2. FTP the data file to another server.

      Thanks,
        • 1. Re: FDM FTP Functionality
          SH_INT
          I'm assuming that you are using the PULL adapter for this. In that case simply put your FTP code in the Load Action script which will be empty (make sure its enabled in the Integration settings) so you can put whatever content you want in it. I've done this before using the in built FTP that ships with the Windows OS. Loads of examples on the internet on how to use this.
          • 2. Re: FDM FTP Functionality
            Michael.J Wonder
            Hello,

            There are many FDM locations share the loacation script, so it can not be empty, i can only add some codes there. So the code should be like below.

            If locationname = mylocation then

            FTP

            exit loadaction

            endif

            My issue is

            1. i did not find ftp codes example on internet.
            2. Can i add the ftp code to the AftExportAction script ? If yes, how can i make sure FDM do not execute the loadaction script if the location name is mylocation ?
            3. If i have to add code to the LoadAction script, how can i make sure nothing happened except the FTP function ?

            Thanks,
            • 3. Re: FDM FTP Functionality
              SH_INT
              Here is a link that describes the windows ftp client commands

              http://windowsitpro.com/networking/using-built-windows-ftp-client

              They can be executed from the command line or encapsualted in a batch script. All you need to do is create a command shell in your script and execute the commands directly or call the batch script
              • 4. Re: FDM FTP Functionality
                Michael.J Wonder
                Thank you SH. Now we use windwos batch instead of FDM script.