AMTrigger.FileName

Syntax

%AMTrigger.FileName%

Trigger supported

File System, Process, Service

Type

String

Description

Returns the specific file name that activated the trigger. Return values vary depending on the type of trigger. The table below describes the return value for each type of trigger.

Trigger Type Description
File System Trigger If the AMTrigger.Action dataset returns FILE ADDED, FILE MODIFIED or FILE DELETED, this dataset returns the absolute path of the file that was either added, modified or deleted (according to the file action that the user initially set for the trigger). An absolute path (also known as full path) is a path that contains the root directory and all other subdirectories that contain a file or folder (for example, C:\folder\subfolder\filename.txt).
Process Trigger Returns the relative path of the process that activated the trigger, which is the file name excluding path information (for example, notepad.exe).
Service Trigger Returns the Service Name of the service that activated the trigger. See AMTrigger.ServiceDisplayName for more details.

Example

Display the message "The file name of the file that activated the trigger. - %AMTrigger.FileName%" in a message box.

NOTE:
  • Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
  • To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.
Copy
<AMSHOWDIALOG WINDOWTITLE="File System Trigger Return Value">The file name of the file that activated the trigger. - %AMTrigger.FileName%</AMSHOWDIALOG>

Related Topics