---
title: "Dirname"
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/dirname
markdown: https://docs.nodetool.ai/nodes/lib/os/dirname.md
product: NodeTool
source: https://github.com/nodetool-ai/nodetool/blob/main/docs/nodes/lib/os/dirname.md
---

# Dirname

**Type:** `lib.os.Dirname`

**Namespace:** `lib.os`

## Description

Get the directory name component of a file path.
    files, path, dirname

    Use cases:
    - Extract directory path from full path
    - Get parent directory
    - Process directory paths

## Properties

| Property | Type | Description | Default |
|----------|------|-------------|---------|
| path | `str` | File path to get dirname from | `` |

## Outputs

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

## Related Nodes

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