Filepath Basename Extract Per Cell
Extract the last literal path component using explicit POSIX or Windows separators, ignoring trailing separators and returning empty for roots; no filesystem access or path resolution occurs.
Description
A basename is the final path component after directory separators.
A basename is the final path component after directory separators. Windows and POSIX paths use different separator rules, so a literal path string should be interpreted using an explicit convention.1
Extract the last literal path component using explicit POSIX or Windows separators, ignoring trailing separators and returning empty for roots; no filesystem access or path resolution occurs.
When to use Filepath Basename Extract Per Cell
Use this tool to extract the last literal path component using explicit POSIX or Windows separators, ignoring trailing separators and returning empty for roots; no filesystem access or path resolution occurs.
Choose the original CSV text, decoded cell strings, byte values or counts requested by this tool. Use the stated delimiter, encoding, indexing and number/date convention.
How to use Filepath Basename Extract Per Cell and understand its results
- Choose the original CSV text, decoded cell strings, byte values or counts requested by this tool. Use the stated delimiter, encoding, indexing and number/date convention.
- Enter values, style using the field table and calculation rules, then run the tool.
- Read basenames. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
| Input field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| values | Values | list of string; maximum length: 10000; minimum entries: 0; maximum entries: 10000 | Required |
| style | Style | string; one of posix, windows | Required |
Provide path strings and select posix or windows. POSIX mode recognizes only slash; Windows mode recognizes slash and backslash and first removes a leading drive prefix such as C:. Trailing separators are removed before the final component is extracted. Empty, separator-only and drive-only strings return an empty basename.
basename = final component after removing trailing platform separators Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| basenames | Basenames | list of string |
{
"input": {
"values": [
"/data/reports/sales.csv",
"/data/archive/",
"/"
],
"style": "posix"
},
"output": {
"basenames": [
"sales.csv",
"archive",
""
]
}
} Limitations and assumptions
This is string processing: it does not access files, resolve dot components, validate Windows device/UNC paths or parse URLs. A backslash remains ordinary text in POSIX mode. URL query strings and percent escapes are not stripped or decoded.
Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Extremely large text inputs are rejected. Cell-string lists also have a combined text budget of 100,000 UTF-16 units per list. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.
Alternative or Complementary methods
Use ID Column Uniqueness Check: Check exact string ID uniqueness in a supplied column, treating empty strings and leading zeros literally; report indices of occurrences after each first occurrence. For a complementary task, use Column Type Inference From Sample: Infer empty, integer, decimal, or string from a column sample using ASCII decimal token syntax; blanks are ignored and leading-zero identifiers remain strings.
References
-
Filepath Basename Extract Per Cell — tool.io
Similar or alternative tools
- ID Column Uniqueness Check
Check exact string ID uniqueness in a supplied column, treating empty strings and leading zeros literally; report indices of occurrences after each first occurrence.
- Column Type Inference From Sample
Infer empty, integer, decimal, or string from a column sample using ASCII decimal token syntax; blanks are ignored and leading-zero identifiers remain strings.