MATLAB Function Reference |
Build full filename from parts
Syntax
Description
fullfile(dir1, dir2, ..., filename)
builds a full filename from the directories and filename specified. This is conceptually equivalent to
except that care is taken to handle the cases when the directories begin or end with a directory separator.
Examples
To create the full filename from a disk name, directories, and filename,
The following examples both produce the same result on UNIX, but only the second one works on all platforms.
fullfile(matlabroot, 'toolbox/matlab/general/Contents.m') fullfile(matlabroot, 'toolbox', 'matlab', 'general', ... 'Contents.m')
See Also
full | func2str |
© 1994-2005 The MathWorks, Inc.