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 3: Printing a File List to a File

Example 3: Printing a File List to a File

Follow the steps below to crate a File List, and then print the File List to a file.
  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 Basic tab of the Create File List task, specify values for the Create File List attributes:
    File List Variable
    The name of a variable that will contain the list of files being created. This will be a variable type of File List.
  3. Click the
    Add
    button, and then choose File Set.
  4. On the Basic tab of the File Set element, specify the values for the following attributes:
    Base Directory
    The starting directory for this File Set.
    Recursive
    Specify whether or not to process files from all sub-folders within the base directory.
  5. 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.
  6. On the Basic tab of the For-Each Loop task, specify the values for the following attributes:
    Items Variable
    Specify the File Set variable that contains the items to iterate over.
    Current Items Variable
    Specify a variable name which will be populated with the value of the row at the current index.
  7. From within the Project Designer page, expand the Miscellaneous folder in the Component Library, and then drag the Print task to the Project Outline.
  8. On the Basic tab of the Print task, specify the Text value.
    Text
    Enter the Current Items Variable created in step 7. Optionally, use the Expression Wizard to add the System Variable '${system.carriageReturn}' after the file variable. The Carriage Return variable will add a line break at the end of each file name printed in the file.
  9. On the Advanced tab of the Print task, specify the following attributes:
    Output File
    The path and file name of the output file that the message will be printed to.
    Append
    Specify whether or not to append data to the end of the specified file. Choose True.
  10. Click the
    Save
    button, and then click the
    Execute Project
    button. The Project will iterate through each file in the File Set and output the file names (including the file path) to the file specified.

Back to Top

0 COMMENTS

We’d like to hear from you!