Welcome Guest! Log in

Checking FTP Get result in Execution Condition

    When connecting to an FTP server, it can be useful to execute distinct branches of a process, depending on how many files were fetched.

    This can be done very simply, using an Execution Condition after the Get FTP action:


     598 getftp result



    • Once the FtpGet Action is executed, its variable "FILE_NB" contains the number of files retrieved.
    • The links to the next actions have an Execution Condition, based on this variable: ${FtpGet/FILE_NB}$
    • Make sure that your Execution Condition refers to the appropriate variable path, matching your FtpGet action's name, for example ${MyFtpAction/FILE_NB}$

    Sending files with FTP or FTPS

      This article covers a few examples of Sending files with FTP (or FTPS).

      Note: SFTP is not FTP, please click here if you need SFTP ;-)


      Good practice: using an FTP metadata

      A Stambia Process can connect to an FTP server with the "Send files with FTP" action (also known as "FtpPut").

      One can set the action's properties directly, or setup an FTP Metadata, which provides benefits such as Configurations, Impact analysis, Metadata management in Analytics, etc.

      We recommend to setup an FTP Metadata (and this article respects this recommendation).

      Sending a single file to an FTP server

      In this example, we want to send a Local file (local to the Runtime) to the remote FTP Server.

      Steps to create the process:

      • Create the FTP Server metadata and a TargetDir folder
      • Add a "Send files with FTP" action from the Palette
      • Drag and drop the FTP Server's target directory from the FTP Metadata to the FtpPut action
      • Set the FTP_LOCAL_FILENAME property to the local file path, e.g. "d:/temp/screen.png"
      • Uncheck "Multiple Mode" because we want to transfer only one file

      576 singlefile


      Note the (1) red circle: these properties are automatically set from the Metadata.

      After execution: the FILE_NB variable confirms we have transferred 1 file.


      Sending multiple files to an FTP Server

      This time, we want to send all the files from a local directory, having a ".png" file extension.

      Here is how we setup the FtpPut action:

      • Make sure "Multiple Mode" is checked
      • Local Path is the local directory containing the files
      • Local Filename is the pattern for the file names : *.png


      576 multiplefiles


      After execution: FILE_NB shows that we have sent 6 files.


      Stambia DI for FTP

        Stambia Data Integration allows to work with FTP servers.

        FTP Metadata is available to define all the server's credentials and communication properties, and to specify the distant FTP folders.

        It can then be used with the dedicated FTP Process Actions to send or receive files and to perform FTP commands on the remote server.

        Read more: Stambia DI for FTP


        Suggest a new Article!