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

5 次查看(过去 30 天)
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

采纳的回答

Jan
Jan 2018-3-21
编辑:Jan 2018-3-21
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Interactive Control and Callbacks 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by