---
title: "Get File Extension Step"
url: "https://docs.robotiq.ai/en/article/get-file-extension-step"
language: "en"
last_updated: "2025-12-25T10:39:52.458Z"
---

# Get File Extension Step

The Get File Extension step takes a file path and pulls out just the file extension. This helps you figure out file types in your automated tasks.

## How to Use Get File Extension

This step puts the file extension into a variable you name.

### Step 1: Add the Get File Extension Step

1.  Drag the "Get File Extension" step into your process flow.
2.  (Optional) Give the step a custom name in the "Step name" field. This helps you identify the step in the editor.

### Step 2: Configure Input Parameters

**File path** (Required)

-   Type the full path to the file.
-   You can use a string variable you already have or just type the path.
-   **Example:** `C:\Documents\report.pdf` or `{{filePathVariable}}`

### Step 3: Configure Output Parameters

**File extension** (Required)

-   Type the name for a new variable to hold the file extension.
-   You can also pick a variable you've already made.
-   The step will put the file extension (like "pdf" or "txt") into this variable.

## Parameters Explained

**Step name** (Optional)

-   A custom name for the step in your process.
-   This name shows up in the Process Editor.

**File path** (Required)

-   This is the full path to the file.
-   **Type:** String variable or a direct string.
-   **Example:** `C:\Users\User\document.docx`

**File extension** (Required)

-   This is the variable where the file extension will be saved.
-   **Type:** A new variable or one you already have.
-   **Example:** If the file path is `C:\report.xlsx`, this variable will hold `xlsx`.

## Related Articles

-   [Define Variable Step](https://docs.robotiq.ai/en/article/define-variable-step) - Learn how to create new variables.
-   [Set Variable Value Step](https://docs.robotiq.ai/en/article/set-variable-value-step) - See how to change what's in existing variables.
-   [Change File Extension Step](https://docs.robotiq.ai/en/article/change-file-extension-step) - Find out how to change a file's extension.

## 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/ec746bc6-a73b-428e-8a22-6189c4a804c6)
