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

Online Help

All Products    Maple    MapleSim


MmaTranslator[Mma]

  

DirectoryName

  

return the directory name from a file path

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

DirectoryName(file path)

Parameters

file path

-

string specifying the path to a file

Description

• 

The DirectoryName command returns a string that gives the directory name from a file path.

Examples

withMmaTranslatorMma:

Use the command with the Maple translation.

DirectoryName/home/UserName/file.ext

/home/UserName/

(1)

DirectoryNameC:\\Users\\MapleUser\\file.ext

C:\Users\MapleUser\

(2)

Alternatively, you can use the FromMma command with the evaluate option specified.

withMmaTranslator:

FromMma`DirectoryName[ "C:\Users\MapleUser\file.ext" ]`,evaluate

C:\Users\MapleUser\

(3)

Compatibility

• 

The MmaTranslator[Mma][DirectoryName] command was updated in Maple 2017.

See Also

FileTools[ParentDirectory

MmaTranslator

MmaTranslator[FromMma]

MmaTranslator[Mma]