Extract File Names from Directory Listings

Directory listings from terminals, file explorers, or command output contain file names mixed with metadata. Paste the listing here to extract just the file names.

How to do this

1

Copy your directory listing

2

Paste into the tool

3

Extract file names

4

Copy the file list

Paste text below and run the tool. Everything runs locally in your browser. No data is stored.

Extract File Names

Find and extract file names with common extensions like .pdf, .docx, .xlsx, .csv, .json, .png, and more.

Example

Input

Please review report.pdf and update data.xlsx. See photo.jpg.

Output

report.pdf
data.xlsx
photo.jpg

How Extract File Names Works

Find and extract file names with common extensions like .pdf, .docx, .xlsx, .csv, .json, .png, and more.

This tool runs entirely in your browser — no data is sent to any server. Paste your text, click Run, and get your result instantly. You can also chain this tool with others using the pipeline feature: run Extract File Names, then continue with a related tool to build a multi-step text workflow.

TextRefinery is a free, open-source text processing toolkit. Learn more about regular expressions and text processing on the web.

TextRefinery — Browser-first text transformation tools. All processing happens locally in your browser.

Example: Extract File Names from Directory Listings

Input

drwxr-xr-x  2 user  staff   64 Mar 15 10:30 images/
-rw-r--r--  1 user  staff  2048 Mar 15 10:30 report.pdf
-rw-r--r--  1 user  staff  1024 Mar 15 10:30 data.xlsx
-rw-r--r--  1 user  staff   512 Mar 15 10:30 notes.txt

Output

report.pdf
data.xlsx
notes.txt