Get File Information Action



See Also

Set Attributes Action-Setting Properties, Touch File, Copy File, Move File, Delete File, Delete Folder, Rename Folder


Gets file(s) information (i.e. File Name, Extension, Creation time, Modified time) and store it into automate variable or dataset.

Practical Usage

See Description


General Tab


Text, Required
a) FILE="C:\sourcefoldername\file.txt"
b) FILE="C:\sourcefoldername\*.txt"
c) FILE="C:\sourcefoldername\*.txt|C:\sourcefoldername\*.doc"
d) FILE="file.txt"


Specifies the file(s) in which information should be grabbed from. This can be a fully qualified path and file name (preferred) or a file name only (requires use of the Change Folder action). Wildcard characters (* or ?) may be used to specify files matching a certain mask. Multiple file and/or file masks may be specified by separating the entries with a pipe symbol (|).


Populate variable with result

Text, Optional


When selected, specified the name of the variable to populate with the chosen file's information as specified in the File property parameter.


File property

Text, Optional


Specifies the file's property in which to populate a variable with. This parameter is available only when the Populate variable with result parameter is selected.

Dataset to populate

Text, Optional


When selected, specifies the name of the dataset to populate with the chosen file's information. A dataset is a multiple column, multiple row container object.

This action creates and populates a dataset with the following fields:








Options Tab

Include Subfolders

Yes/No, Optional, Default: NO

When set to YES, specifies that, if present, subfolders should be searched for files matching the mask specified in the File parameter.

Exclude Mask

Text, Optional, Default: (blank)

Causes the action not to affect files matching the masks specified. Filenames or wildcard masks may be used. Multiple entries may be specified by separating them with a pipe symbol (|), for example: *.txt|*.bak

Only if Newer Than

Date, Optional, Default: (none)
MARKUP: ISNEWERTHAN="%DateSerial(2007,02,01) + TimeSerial(00,00,00)%"

Causes the action to only affect files if the source is 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).

Only if Older Than

Date, Optional, Default: (none)
MARKUP: ISOLDERTHAN="%DateSerial(2007,02,01) + TimeSerial(00,00,00)%"

Causes the action to only affect files if the source is 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).

Attributes Tab


Text, Optional, Default: (blank)
ATTRFILTER="+R+A-S-H" (change attributes on read-only and archive files, not on system or hidden files)
ATTRFILTER="-S" (do not change system files)

This group of settings causes the action to filter which files are affected by the attribute change based on the original attribute settings of the source files.

In visual mode, a group of controls are provided to assist in the selection of this parameter. In AML mode, a single text item must be specified that contains the original attribute mask of the files you wish to affect.

Available Options:


Custom Description

This action includes the Description tab for entering a custom step description.

More on setting custom step description

Standard Error Handling Options

This action also includes the standard Error Causes and On Error failure handling options/tabs.

More on Error Handling Options

Variables and Expressions

All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.

More on variables
More on expressions

More on the expression builder


NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

<AMGETFILEINFO FILE="C:\Temp\Addresses.txt" RESULTVARIABLE="theVariable" FILEPROPERTY="Fullname" />