Function Reference
— Function File: [dir, name, ext, ver] = fileparts (filename)

Return the directory, name, extension, and version components of filename.

See also: fullfile