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

# Filter File Names

**Type:** `lib.os.FilterFileNames`

**Namespace:** `lib.os`

## Description

Filter a list of filenames using Unix shell-style wildcards.
    files, pattern, filter, list

    Use cases:
    - Filter multiple files by pattern
    - Batch process files matching criteria
    - Select files by extension

## Properties

| Property | Type | Description | Default |
|----------|------|-------------|---------|
| filenames | `list[str]` | list of filenames to filter | `[]` |
| pattern | `str` | Pattern to filter by (e.g. *.txt, data_*.csv) | `*` |
| case_sensitive | `bool` | Whether the pattern matching should be case-sensitive | `true` |

## Outputs

| Output | Type | Description |
|--------|------|-------------|
| output | `list[str]` |  |

## Related Nodes

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