Skip to main content

Path File Name

Category: Files Path File Name block screenshot

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

InputRequiredValue KindTypesEnum Values
pathyesexpressionstring

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.

kind: Pattern · format: runtime-dsl · validation: Schema only

Topics: files, path handling

Source: patterns/ex-files-copy-into-created-folder.json

Download JSON