Text - Format path |
<AMTEXT ACTIVITY="path" PATH="text" PATHACTION="text (options)" EXTENSION="text" RESULTVARIABLE="text" /> |
Description:
Formats the specified file path in order to reveal the file name, file extension or directory and populates a variable with the result. Can also modify the extension of a specific file. This activity supports fully qualified and relative paths.
Used as a text manipulation tool to format specific parts of a file path.
General
Property |
Type |
Required |
Default |
Markup |
Description |
Path |
Text |
Yes |
(Empty) |
PATH="c:\temp\file.txt" |
The file path to format. As with every text parameter, if the data you wish to enter is contained in a variable, simply enter the variable name surrounded by percentage signs to resolve it to it's contents at runtime (e.g.,%VarName%). |
Action |
Text (options) |
Yes |
(Empty) |
|
The type of action to perform on the file path. The available options are:
|
Extension |
Text |
Yes if Action is set to Change extension |
(Empty) |
EXTENSION=".png" |
The file extension to modify. This parameter is available only if the Action parameter is set to Change file extension to. |
Populate variable with result |
Text |
Yes |
(Empty) |
RESULTVARIABLE="varname" |
The name of an existing variable to be populated with the new value. |
NOTE: The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder. |
Description:
This sample task will format a specific path to reveal only the file name.
<AMVARIABLE NAME="thePath" VALUE="C:\temp\sample_images\AM_image.jpg" /> <AMSHOWDIALOG WINDOWTITLE="The path to format">This sample task will format the following path to reveal only the file name: %thePath%</AMSHOWDIALOG> <AMTEXT ACTIVITY="path" PATH="%thePath%" RESULTVARIABLE="thePath" /> <AMSHOWDIALOG WINDOWTITLE="The path formatted">The file name: %thePath%</AMSHOWDIALOG>
|