Path Basename
Basename and extension; optional drop extension.
Takes the final path segment and its extension. Optional drop-extension returns the stem as the name. Unlike Safe Filename this does not sanitize characters. Empty path fails.
What Path Basename does
Takes the final path segment and its extension. Optional drop-extension returns the stem as the name. Unlike Safe Filename this does not sanitize characters. Empty path fails.
Practical limit for Path Basename: Accepts / or \ separators. Trailing slashes stripped. That is why output can differ from heavy desktop Developer software. Read the tool-specific note again: Takes the final path segment and its extension. Optional drop-extension returns the stem as the name. Unlike Safe Filename this does not sanitize characters. Empty path fails.
How to use Path Basename
- Keep this tab on Path Basename (/developer/path-basename). Pasting into the wrong Developer tool (for example Safe Filename) changes the job.
- Paste or type the input Path Basename expects. Path hint: developer · path basename. Basename and extension; optional drop extension.
- Apply the Path Basename action only. MIME Type Lookup is a different transform (Look up MIME by extension or reverse to extension.). Takes the final path segment and its extension. Optional drop-extension returns the stem as the name. Unlike Safe Filename this does not sanitize characters. Empty path fails.
- Copy the output of Path Basename if you need it elsewhere. Size/complexity still follows: Accepts / or \ separators. Trailing slashes stripped.
- If the text job is actually Replace illegal filename characters; length, case, spaces., leave Path Basename and open Safe Filename.
When not to use Path Basename
Skip Path Basename when a neighbor tool matches better — start with Safe Filename or MIME Type Lookup — or when the description already warns the job will fail. In the tool’s own words: Takes the final path segment and its extension. Optional drop-extension returns the stem as the name. Unlike Safe Filename this does not sanitize characters. Empty path fails.
Questions about Path Basename
- What does Path Basename do that other Developer pages on this site do not?
- Takes the final path segment and its extension. Optional drop-extension returns the stem as the name. Unlike Safe Filename this does not sanitize characters. Empty path fails. Short version: Basename and extension; optional drop extension.
- Does Path Basename upload my file or text to Tool-You servers?
- No. Path Basename runs in this browser tab. Files stay on the device. Limit note: Accepts / or \ separators. Trailing slashes stripped.
- Should I use Safe Filename instead of Path Basename?
- Use Path Basename when you need Basename and extension; optional drop extension. Use Safe Filename when you need Replace illegal filename characters; length, case, spaces. They share a category (Developer) but not the same job.
- What are the limits of Path Basename?
- Accepts / or \ separators. Trailing slashes stripped. Also: Takes the final path segment and its extension. Optional drop-extension returns the stem as the name. Unlike Safe Filename this does not sanitize characters. Empty path fails.