Find files with a specific prefix
조회 수: 37 (최근 30일)
이전 댓글 표시
Hi everyone,
I would like to find the files inside a folder that have a letter 's' in the first position of its name. Then I would like to get the file name of those files that have that condition. In this folder I have files starting with 'csc', 'ms', 'c2s', so finding those names that contain the letter 's' is not an option (I had already tried those using dir and contains functions). Do you have any idea how to solve this?
Many thanks, Ramiro
댓글 수: 0
채택된 답변
aborghes
2017년 8월 8일
Hi Ramiro,
I would recommend using the startsWith function. It should do what you are looking for.
댓글 수: 3
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 File Operations에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!