WLJS LogoWLJS Notebook

FileNameSplit

FileNameSplit["name"] splits a file path into a list of components.

Examples

Split a path:

FileNameSplit["/path/to/file.txt"]
(* {"/", "path", "to", "file.txt"} *)
FileNameSplit["folder/subfolder/data.csv"]
(* {"folder", "subfolder", "data.csv"} *)

Please visit the official Wolfram Language Reference for more details.

On this page