Path File Name
Returns the last segment of a filesystem-like path string. The result keeps the final extension when one exists. Trailing path separators are ignored before the file name is read. This block operates lexically on a path string; it does not check whether the path exists or whether the last segment is really a file.
Inputs
| Input | Required | Value Kind | Types | Enum Values |
|---|---|---|---|---|
path | yes | expression | string | — |
Notes
- Pure read expression that returns the last segment of a filesystem-like path string.
- Keeps the final extension when one exists.
Examples
Copy File Into Created Folder
Builds a sibling destination folder and file path, creates the folder, then copies the file into it.
Topics: files, path handling
Source: patterns/ex-files-copy-into-created-folder.json