A list file paths of the files in the folder
Afficher commentaires plus anciens
I want to create a list of all the files in a folder with relative paths to 2 steps upward parent folder. I have used this code so far:
o_file_list = dir(Dir_name);
for ii = 1:length(o_file_list);
[pathstr,name,extension] = fileparts(o_file_list(ii).name);
end
output = o_file_list;
But the thing is I know how to create a list of files in the folder, but I can't find any info how to construct relative paths to a folder of my choice. Any help would be appreciated.
Best, Gert
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Import and Integrate Requirements dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!