Skip to content

Get File Name Without Extension Command: getFileNameWithoutExt

The GetFileNameWithoutExtension command retrieves the file name without its extension from a specified file path. The result is stored in a variable for use in later steps of your automation process.

Example: Suppose you have a file located at C:\Documents\Report.xlsx and want to extract only the file name Report, excluding the extension .xlsx.

Steps to configure:

  1. Select Set a Variable Value from the Action dropdown.
  2. Enter a variable name in the Element Key field (e.g., FileNameNoExt). 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 getFileNameWithoutExt.
  6. Provide the full file path in the File parameter (e.g., C:\Documents\Report.xlsx).
  7. Click Save.
scrn-get-file-name-without-ext-tabular-view
Tabular View
scrn-get-file-name-without-ext-card-view
Card View

Outcome:

  • The system extracts the file name without the extension (e.g., Report) from the provided file path.
  • The extracted value is stored in the variable defined in the Element Key field. You can reference this variable later in your automation process using the syntax ${FileNameNoExt}.

Back To Top