AMTrigger.FileName
Syntax
%AMTrigger.FileName%
Trigger supported
Type
String
Description
Returns the specific file name that activated the trigger. Return values vary depending on the type of trigger. The following table 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 is 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 | The relative path of the process that activated the trigger, which is the file name excluding path information (for example, notepad.exe). |
| Service Trigger |
The Service Name of the service that activated the trigger. See AMTrigger.ServiceDisplayName for more information. |
Example
- 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.
The following displays the message The file name of the file that activated the trigger. - %AMTrigger.FileName%:
<AMSHOWDIALOG WINDOWTITLE="File System Trigger Return Value">The file name of the file that activated the trigger. - %AMTrigger.FileName%</AMSHOWDIALOG>