---
title: "Get File or Folder Name Step"
url: "https://docs.robotiq.ai/en/article/get-file-or-folder-name-step"
language: "en"
last_updated: "2025-12-25T10:42:54.381Z"
---

# Get File or Folder Name Step

The Get File or Folder Name step gets the name of a specific file or folder. You can use it to pull just the name from a full path, with or without the file extension.

## How to Use Get File or Folder Name

Use this step to get a file or folder's name from its full path.

### Step 1: Add the Step to Your Process

1.  Drag and drop the **Get File or Folder Name** step into your process.
2.  (Optional) In the **Step Name** field, type a custom name for this step.

### Step 2: Configure Input Parameters

1.  In the **Path** field, pick an existing text variable that holds the full path to the file or folder.
2.  In the **Type** field, choose if you are getting the name of a `File` or a `Folder`.
3.  If you picked `File` for the **Type**:
    -   In the **Save with extension** field, choose `T` (True) to include the file extension in the output name, or `F` (False) to leave it out. `F` is the default setting.

### Step 3: Define Output Parameter

1.  In the **Name** field, pick an existing text variable or make a new one. This variable will hold the file or folder name you pulled out.

## Parameters Explained

**Step Name** (Optional)

-   A custom name for the step in your process.
-   Example: "Get Invoice File Name"

**Path** (Required)

-   The full path to the file or folder. This must be an existing text variable.
-   Example: `C:\Documents\Invoice.pdf`

**Type** (Required)

-   Says if you are getting a `File` name or a `Folder` name.
-   Options: `File`, `Folder`

**Save with extension** (Required, only shows if Type is `File`)

-   Controls if the file extension is part of the output name.
-   `T`: Includes the extension (e.g., "Invoice.pdf")
-   `F`: Leaves out the extension (e.g., "Invoice")
-   Default value: `F`

**Name** (Required)

-   The variable where the file or folder name will be saved. This can be a new or existing text variable.
-   Example: `fileName` (will contain "Invoice.pdf" or "Invoice" depending on settings)

## Related Articles

-   [Get Files In Folder Step](https://docs.robotiq.ai/en/article/get-files-in-folder-step)
-   [Get Folders In Folder Step](https://docs.robotiq.ai/en/article/get-folders-in-folder-step)
-   [Create Folder Step](https://docs.robotiq.ai/en/article/create-folder-step)
-   [Define Variable Step](https://docs.robotiq.ai/en/article/define-variable-step)

## Need Help?

Can't find what you're looking for? Join the [Robotiq Community](https://community.robotiq.ai/home/) to get help from other users and the Robotiq team.

![](https://cdn-assets.productfruits.com/46752223-c760-40fe-90d8-901f2780cb7c)
