필터 지우기
필터 지우기

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

조회 수: 5 (최근 30일)
Taylor Nichols
Taylor Nichols 2018년 3월 21일
편집: Jan 2018년 3월 21일
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