How do i load a file automatically in a particular folder just by a part of the filename?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Sachin NARAIN
am 13 Mai 2019
Kommentiert: Sachin NARAIN
am 13 Mai 2019
I have a file named 'Annot_CU' in a folder.I want to load this file just finding the word 'Annot' in the particular folder.
I am not able to find the code to this .
Thank you in advance.
0 Kommentare
Akzeptierte Antwort
Rik
am 13 Mai 2019
folder='C:\Path\To\Your\Data';
list_of_files=dir(fullfile(folder,'Annot*'));
%remove any matching folders
list_of_files([list_of_files.isdir])=[];
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!