Skip to content

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

  1. Select SET from the Action dropdown.
  2. Enter a variable name in the Element Key field (e.g., FileName). This variable will store the result.
  3. Click on Form to open the configuration window.
  4. Select Functions from the dropdown, then choose File handler Functions as the function.
  5. In the Cmd field, select getFileNameWithExt.
  6. Provide the full file path in the File parameter (e.g., C:\Documents\Report.xlsx).
  7. Click Save.

v7_file_and_folder_op_getfilenamewithext

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}.

Last updated: Oct 13, 2025
Back To Top