Table of Contents

Search

  1. Preface
  2. Introduction
  3. Dashboard
  4. Resources
  5. Workflows
  6. Task Reference
  7. Services Overview
  8. Users
  9. Logs and Reports
  10. Encryption
  11. System
  12. Appendix
  13. Glossary Terms

Example: For-Each Loop

Example: For-Each Loop

A particular FTP Server may not accept multiple files at a time from a client. In order to send multiple files to that FTP Server, you could instead use a For Each Loop on the File List to perform a Manual Put one file at a time. In this scenario, only files ending with "txt" need to be sent to the FTP server.
  1. Create a File List of files to send to the FTP Server:
    1. From within the Project Designer page, expand the File System folder in the Component Library, and then drag the Create File List task to the Project Outline.
    2. On the Create File List page, specify the File List Variable.
      Specify the File Set that contains the files to transfer.
    3. Click the
      Add
      button in the page toolbar and select the File Set menu item.
    4. In the File Set page, type the complete directory path to the Base Directory that contains the files or click the icon to browse for the directory.
  2. Create a Wildcard filter to find files ending with "txt" and include them in the File Set:
    1. Click the
      Add
      button in the page toolbar and select the Add Wildcard Filter menu item.
    2. On the Wildcard Filter page, click the
      Add
      button in the page toolbar and then select the Include Files menu item.
    3. In the Wildcard Pattern page, type the filter pattern.
  3. Create the For-Each Loop:
    1. From within the Project Designer page, expand the Loops folder in the Component Library, and then drag the For-Each Loop task to the Project Outline.
    2. Specify the Items Variable and the Current Item Variable for the For Each Loop.
  4. Create the FTP Task to put the files on the FTP Server:
    1. From within the Project Designer page, expand the FTP folder in the Component Library, and then drag the FTP task to the Project Outline.
    2. Specify the FTP Server.
  5. Under the FTP Task, create the Manual Put element to put each file individually on the server without additional file path information:
    1. On the FTP Task page, click the
      Add
      button in the sub-menu and select the Put a File Manually menu item.
    2. Specify the Source File variable and the Destination File variable.
  6. Click the
    Save
    button.

0 COMMENTS

We’d like to hear from you!