Skip to content
UniKit

File name extractor

Extract file names from a list of paths — Windows backslashes and Unix slashes both handled, with UNC shares, drive letters and trailing separators, plus fallback, deduplication and sorting.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Path list

File names

One file name per line, ready to copy.

Paste a path list to extract file names

Paths: 0 · With file name: 0 · Missing: 0 · Unique names: 0

What this tool does

  • Reduce an exported Windows file listing to bare names for comparison or deduplication.
  • Check that a backup folder mirrors the source folder file by file.
  • Normalise log lines that mix Windows and Linux paths into one list of file names.

Example

Input

C:\Users\alice\Desktop\report.xlsx
\\server\share\logs\app-2026.log
/var/log/nginx/access.log

Output

report.xlsx
app-2026.log
access.log

Both slash styles work: the UNC path yields app-2026.log, and the trailing-separator path D:\media\ falls back to media.

Frequently asked questions

Are backslashes treated as escapes?

No. The tool splits on characters, so the backslashes in C:\Users\a.txt are separators. Just note that a doubled-backslash literal copied from code or JSON adds an empty segment without changing the file name.

What does an UNC path like \\server\share\file.txt yield?

file.txt. The leading \\server\share becomes several segments and only the last one is the file name. A path ending at the share name yields nothing unless “Fall back to the previous segment” is on, which gives share.

How are drive roots handled?

C:\ is recognised as a drive letter, not a file name, so a lone C:\ yields nothing by default and C: with the fallback enabled — a quick way to spot drive roots.

Can it handle Windows and Linux paths together?

Yes, both separators can appear in the same list, and the stats report the detected kind per line (windows, unc or unix).

Keywords:文件名提取路径提取文件名file name extractorwindows 路径反斜杠unc 路径basename批量取文件名

Related tools