Wait for File Action—Setting Properties

The Wait for File action is used to pause a task until a specified file exists, does not exist, or changes. Multiple files can be specified and wildcard characters can be used. If the action is waiting for files to exist or to change, it waits until one file meets the specified properties. If it is waiting till a file does not exist, it waits until no file matches the specified properties.

This action is commonly used in conjunction with file downloads or transfers to ensure the action is complete before going on to additional steps.

To set Wait for File properties

  1. From the Task Builder Available Actions pane, open the Wait folder and double-click the Wait for File action or drag it into the Steps pane.

  2. Under Action, select Wait until file exists, Wait until file does not exist, or Wait until file has changed.

  3. In the File box, click the Open Folder button, navigate to the location, and enter the file name. Alternately, you can type in the path and file names. You can use asterisk (*) and question mark (?) as wildcard characters. For example, use *.DOC to indicate any file in the selected folder with a .DOC extension. Separate multiple entries with a pipe symbol (|). Example: C:\Folder\*.doc|File1.txt.

  4. To ensure the task remains paused until any action on the file is complete, make sure Wait until file is not in use is selected.

  5. To populate a variable with the file name of the specified file, select the variable in the Populate file name into variable box. This is commonly used with a Wait until file exists action where the file name was designated with a wildcard character. The variable must be created in an earlier step using the Create Variable action.

  6. To populate a dataset with the file data, enter a name for the dataset in the Create and populate dataset box. (Dataset names must be alphanumeric, begin with a letter, and contain no spaces.)

    The dataset will show the file's name, size, date created, date modified, date last accessed, plus the state of various attributes.

  7. Click the Options tab.

  8. In the Exclude mask box, enter the names of any files or folders within the selected source folder that you want to exclude from the action. You can use asterisk (*) and question mark (?) as wildcard characters. Separate multiple entries with a pipe symbol (|).

  9. To exclude files from the action based on date, select the Only if newer than or Only if older than check boxes. Then use the date and time boxes to select the desired date and time. You can also click the Custom button and select a limiter such as Last 24 hours, or you can select Expression and enter an expression.

  10. To set the Description tab properties, refer to Description Tab Options.

  11. To set the Error Causes and On Error tab properties, refer to Step Error Handling.

  12. When finished, click OK to save settings and close the properties dialog window.

See Also

About Actions

Adding Task Steps

Wait for File Action