Filename - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


FileTools

  

Filename

  

get filename from filepath

  

ParentDirectory

  

get parent directory from filepath

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Filename(path)

ParentDirectory(path)

Parameters

path

-

string; filepath, relative or absolute

Description

• 

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.

Examples

datafileFileToolsJoinPathExcel/ExperimentalData.xls,base=datadir:

FileToolsFilenamedatafile

ExperimentalData.xls

(1)

The following path does not correspond to an existing file.

FileToolsFilename/friends/romans/countrymen

countrymen

(2)

FileToolsParentDirectory/friends/romans/countrymen

/friends/romans

(3)

See Also

FileTools

FileTools[AbsolutePath]

FileTools[Basename]

FileTools[Extension]

FileTools[JoinPath]

FileTools[SplitPath]