[matlab][solution] Get file directory or extension of file


min read

My profile

Share this:

Use fileparts and you will get the directory without using any / or explode usage.

[code:1:059164e278]>> fullpath
fullpath = /home/user/www/site/trunk/tempuploads/test/174_bw_tractsresize.png

>> [pathstr, name, ext] = fileparts(fullpath)

pathstr =

name =

ext =

Share this:

Leave a Reply

Your email address will not be published. Required fields are marked *