Borrar filtros
Borrar filtros

structuring of folder name

2 visualizaciones (últimos 30 días)
prashant singh
prashant singh el 10 de Jul. de 2016
Respondida: Image Analyst el 10 de Jul. de 2016
how can i divide the path like C:/document/data/data-1/ into a structure which contain name of individual folder like {document, data, data-1} or just access the last folder into a variable like x = data-1.

Respuesta aceptada

Image Analyst
Image Analyst el 10 de Jul. de 2016
Try this:
folder = 'C:/document/data/data-1/'
individualFolders = strsplit(folder, '/')
folder =
C:/document/data/data-1/
individualFolders =
'C:' 'document' 'data' 'data-1' ''

Más respuestas (0)

Categorías

Más información sobre String Parsing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by