Folder name usually carries some description of the files stored in the folder. However, it is sometimes interesting to use the name of a folder on a higher level. This function returns the string user chosen level folder, eliminating the need to present the whole path in cases it is obsolete.
Hi Jan Simon.
Thanks for the comment.
Indeed you're correct. I thought that '.' (dot) is an illegal character in folder name. Apparently I was wrong. I did some fix which works for actual files- uploading it now. For a case where a arbitrary string is used it seems that this function should receive a path to a folder rather then a file until I'll find a way to distinguish between file and folder.
Even folder names can contain a dot, so it is not a fair limitation to assume, that the existence of a dot means that the input is a file.
Fixed the dot based distinguish between file name and folder name according to a comment.
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.