A list file paths of the files in the folder
Ältere Kommentare anzeigen
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
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Import and Integrate Requirements finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!