Get File Name With Extension Command: getFileNameWithExt
The GetFileNameWithExtension command retrieves the name of a file along with its extension from a specified file path. The result is stored in a variable for later use in your automation process.
Example: Suppose you have a file located at C:\Documents\Report.xlsx and want to extract the file name with its extension, Report.xlsx, to use in later steps.
Steps to configure
- Select Set a Variable Value from the Action dropdown.
- Enter a variable name in the Element Key field (e.g., FileName). This variable will store the result.
- Click on Form to open the configuration window.
- Select Functions from the dropdown, then choose File handler Functions as the function.
- In the Cmd field, select getFileNameWithExt.
- Provide the full file path in the File parameter (e.g., C:\Documents\Report.xlsx).
- Click Save.


Outcome:
- The system extracts the file name with its extension (e.g., Report.xlsx) from the specified file path.
- The extracted value is stored in the variable you defined in the Element Key field. You can reference this variable later in your automation process using the syntax ${FileName}.