MATLAB Function Reference Previous page   Next Page
fileparts

Return filename parts

Syntax

Description

[pathstr, name, ext, versn] = fileparts('filename') returns the path, filename, extension, and version for the specified file. The returned ext field contains a dot (.) before the file extension.

The fileparts function is platform dependent.

You can reconstruct the file from the parts using

Examples

This example returns the parts of file to path, name, ext, and ver.

See Also

fullfile


Previous page  File Formats filesep Next page

© 1994-2005 The MathWorks, Inc.