Borrar filtros
Borrar filtros

How to get the folder name?

31 visualizaciones (últimos 30 días)
faran
faran el 27 de Ag. de 2018
Editada: Jan el 28 de Ag. de 2018
I used "uigetdir_workaround" command to select a folder and in return I receive the path. Is there any command that can give me the name of the folder I selected? I know that I can use some command to find the last "\" and take the names after that as the name of the folder but I was wondering if there is any specific command to gives the name of the selected folder or not!

Respuesta aceptada

Jan
Jan el 28 de Ag. de 2018
As long a "uigetdir_workaround" is not known, how can we guess, which output you get? Why don't you use uigetdir? To split a path name into a folder and the file use fileparts.
  2 comentarios
faran
faran el 28 de Ag. de 2018
Editada: Jan el 28 de Ag. de 2018
Due to some bug for using uigetdir command in deploying application for Matlab R2017, "uigetdir_workaround" was being used before the update of matlab. Currently it is fixed in R2018a update 4. https://www.mathworks.com/support/bugreports/1729458?s_tid=srchtitle
faran
faran el 28 de Ag. de 2018
Fileparts worked, thanks

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Environment and Settings en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by