file.fileFromPath

Syntax file.fileFromPath (path)

Params path is a legal path name to the file or folder whose name you wish to determine.

Action Extracts the file name from the path.

Returns The name of the object at path as a string.

Examples file.fileFromPath ("C:\\Program Files\\Frontier\\Copy of cactus.gif")

   » "Copy of cactus.gif"

file.fileFromPath ("System:System Folder:Finder")

   » Finder

file.fileFromPath ("System:System Folder:")

   » System Folder: // path is a folder.

Notes file.fileFromPath returns the last name in the path. There is no guarantee that the item exists.

If a folder path is provided, file.fileFromPath returns the folder name.

See Also file.folderFromPath

file.volumeFromPath

Discuss