Examples
file = 'C:\filepath\filename.txt';
[pathstr, name, ext] = fileparts(file)
pathstr =
C:\filepath
name =
filename
ext =
.txt
 |
===================================== |
file = '\filepath\.txt';
[pathstr, name, ext] = fileparts(file)
pathstr =
\filepath
name =
Empty string: 1-by-0
ext =
.txt
No comments:
Post a Comment