Description |
Causes the steps following this action to execute if the specified file is in the specified state. If not, execution follows the next Else or End If action, whichever comes first. Wildcard characters can be used. Use If File Exists to set up conditional actions depending on the state of a file. |
Declaration |
<AMIF ACTION="text [options]" FILE="text" EXCLUDE="text" ISNEWERTHAN="datetime" ISOLDERTHAN="datetime" ATTRFILTER="text [attribute mask]" "RESULTDATASET="text"> </AMIF> |
Examples |
<AMIF FILE="c:\foldername\filename.txt"> <AMIF ACTION="accessible" FILE="C:\FolderName\*.*"
EXCLUDE="*.doc" ISNEWERTHAN="%DateSerial(2007,02,01) +
TimeSerial(00,00,00)%" ATTRFILTER="-s" RESULTDATASET="IfFileDataset"> |
General Tab Parameters |
If: Specifies the type of check to be performed. The available options are:
Text, Optional, Default: exist File: Specifies the full path and file name to check. Text, Required Create and populate dataset with result information: Specifies the name of a dataset to be created and populated with the file data for the file that caused the If block to be executed. In addition to the standard dataset fields, the dataset will contain the following:
Text, Optional |
Advanced Tab Parameters |
Exclude mask: Causes the action not to look for files matching the masks specified. File names or wildcard masks may be used. Multiple entries may be specified by separating them with a pipe symbol (|), for example: *.txt|*.bak. Text, Optional, Default: (blank) Only if newer than: Causes the action to look only for files newer than the date/time specified. If this parameter is left blank or not included, the date of the files will be ignored (unless limited by the Only if older than [ISOLDERTHAN] parameter). Date, Optional, Default: (none) Only if older than: Causes the action to look only for files older than the date/time specified. If this parameter is left blank or not included, the date of the files will be ignored (unless limited by the Only if newer than [ISNEWERTHAN] parameter). Date, Optional, Default: (none) Click Custom to select from other time options (Last 30 seconds, Last 30 minutes, Last 24 hours, Last 30 Days, Last 12 Months, Last 5 Years, Next 30 Seconds, Next 30 Minutes, Next 24 Hours, Next 30 Days, Next 12 Months, Next 5 Years). A expression appears in the text box (e.g., %DateAdd( "s", -30, CStr( Now() ))%) and the Expression check box is selected. You can also click the Expression Builder icon to build a custom expression. |
Attributes Tab Parameters |
Attributes: This group of settings causes the action to filter which files to look for based on the attribute settings of the source files. In visual mode, a group of controls is provided to assist in the selection of this parameter. In markup mode, a single text item must be specified that contains the attributes of the files you want to find.
Text, Optional (blank) |