Effacer les filtres
Effacer les filtres

How to access .jpg files from a folder and save names of .jpg files

5 vues (au cours des 30 derniers jours)
Taylor Nichols
Taylor Nichols le 21 Mar 2018
Modifié(e) : Jan le 21 Mar 2018
I need to access a folder that contains multiple jpeg files. I now the name of the folder, but the jpeg files are randomly named so I need to find a way to figure out the names of the files so I can open them.
Thanks ahead for the help

Réponse acceptée

Jan
Jan le 21 Mar 2018
Modifié(e) : Jan le 21 Mar 2018
FileList = dir(fullfile(FolderName, '*.jpg'));
File = fullfile(FolderName, {FileList.name});
Now File is a cell string containing the absolute paths. You can open these files in a loop now.

Plus de réponses (0)

Catégories

En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by