If Folder Exists

Causes the steps following this action to execute if the specified folder is in the specified state. If not, execution follows the next Else or End If action, whichever comes first. This action accepts wildcard masks (i.e. * or ?). Generally used to check if a folder exists (or does not exist) and execute conditional actions depending on the result.

Declaration

<AMIF FOLDER="text" ISNEWERTHAN="date" ATTRFILTER="text">

See Also: If, If Compare Files, If Last Step, If Pixel Exists, If Process Running, If Text Contains, If Windows Exists, End If, End Select/Case, Goto, Label, Select/Case, Else

General Tab

Property

Type

Required

Default

Markup

Description

If

Text (Options)

Yes

Folder exists

ACTION="not_exist"

Specifies the type of check to be performed. The available options are:

  • Folder exists: the IF block will be executed if the specified folder exists.

  • Folder does not exist: the IF block will be executed if the specified folder does not exist.

Folder

Text

Yes

(Empty)

a)FOLDER="c:\foldername"

b)FOLDER="c:\folder*"

Specifies the folder to check. This action accepts wildcard masks (i.e. * or ?).

Advanced Tab

Property

Type

Required

Default

Markup

Description

Exclude Mask

Text

No

(Empty)

EXCLUDE="folder1*"

Causes this action to omit folders matching the masks specified. File names or wildcard masks may be used.

Only if Newer Than

Date

No

(Empty)

ISNEWERTHAN=

"%DateSerial(2007,02,01) + TimeSerial(00,00,00)%"

Causes this action to evaluate only folders newer than the date/time specified. If this parameter is left blank or not included, the folder date will be ignored.

Only if Older Than

Date

No

(Empty)

ISOLDERTHAN=

"%DateSerial(2007,02,01) + TimeSerial(00,00,00)%"

Causes this action to evaluate only folders older than the date/time specified. If this parameter is left blank or not included, the folder date will be ignored.

Attributes Tab

Property

Type

Required

Default

Markup

Description

Attributes

Text Options

No

(Empty)

ATTRFILTER="+R+A-H" (compress read-only & archive files but not hidden files)

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 are 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 are looking for.

Available Options:

  • R— Read-only: Specifying "+R" causes files with this attribute turned on to be included, "-R" causes files with this attribute turned off to be included, not specifying the letter (default) causes this attribute to be ignored.

  • A— Archive: Specifying "+A" causes files with this attribute turned on to be included, "-A" causes files with this attribute turned off to be included, not specifying the letter (default) causes this attribute to be ignored.

  • S— System: Specifying "+S" causes files with this attribute turned on to be included, "-S" causes files with this attribute turned off to be included, not specifying the letter (default) causes this attribute to be ignored.

  • H— Hidden: Specifying "+R" causes files with this attribute turned on to be included, "-H" causes files with this attribute turned off to be included, not specifying the letter (default) causes this attribute to be ignored.

  • C— Compression: Specifying "+C" causes files with this attribute turned on to be included, "-C" causes files with this attribute turned off to be included, not specifying the letter (default) causes this attribute to be ignored.