---
title: "Basename"
description: "Local-first visual environment for building and running AI workflows. Build agents visually, deploy anywhere, privacy by design."
canonical: https://docs.nodetool.ai/nodes/lib/os/basename
markdown: https://docs.nodetool.ai/nodes/lib/os/basename.md
product: NodeTool
source: https://github.com/nodetool-ai/nodetool/blob/main/docs/nodes/lib/os/basename.md
---

# Basename

**Type:** `lib.os.Basename`

**Namespace:** `lib.os`

## Description

Get the base name component of a file path.
    files, path, basename

    Use cases:
    - Extract filename from full path
    - Get file name without directory
    - Process file names independently

## Properties

| Property | Type | Description | Default |
|----------|------|-------------|---------|
| path | `str` | File path to get basename from | `` |
| remove_extension | `bool` | Remove file extension from basename | `false` |

## Outputs

| Output | Type | Description |
|--------|------|-------------|
| output | `str` |  |

## Related Nodes

Browse other nodes in the [lib.os](./) namespace.
