FileTools
Filename
get filename from filepath
ParentDirectory
get parent directory from filepath
Calling Sequence
Parameters
Description
Examples
Filename(path)
ParentDirectory(path)
path
-
string; filepath, relative or absolute
The Filename and ParentDirectory commands return the filename and the parent directory, respectively, of the file referenced by the filepath path.
The filepath path must be syntactically correct, but is not required to correspond to an existing file or directory.
The behavior of this command may dependent on the platform on which it is executed and the character used to delimit directories on the current platform.
datafile≔FileToolsJoinPath⁡Excel/ExperimentalData.xls,base=datadir:
FileToolsFilename⁡datafile
ExperimentalData.xls
The following path does not correspond to an existing file.
FileToolsFilename⁡/friends/romans/countrymen
countrymen
FileToolsParentDirectory⁡/friends/romans/countrymen
/friends/romans
See Also
FileTools[AbsolutePath]
FileTools[Basename]
FileTools[Extension]
FileTools[JoinPath]
FileTools[SplitPath]
Download Help Document