getfilenames.m

버전 1.4.0.0 (1.82 KB) 작성자: Joseph Burgel
Do a recursive search for files.
다운로드 수: 3.9K
업데이트 날짜: 2009/5/28

라이선스 보기

Returns a cell array of all files matching the wildcard expression "refiles" beginning in the root folder "root". Includes subdirectories.

%---Example:
mfiles = getfilenames('c:\','*.m') will return all .m files on the c drive to the cell array "mfiles".

인용 양식

Joseph Burgel (2025). getfilenames.m (https://kr.mathworks.com/matlabcentral/fileexchange/2118-getfilenames-m), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R12.1
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 File Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.4.0.0

Bug Fix

1.3.0.0

Thanks to Kenn Sebesta. His Comments:

Hi, I fixed getfilenames.m to work with Mac. I'm betting it works with
Linux now, too.

The secret ingredient was `fullfile`, which lets Matlab decide for
itself how to format dir calls.

1.2.0.0

Bug fix on line 36. Changed 'cd' to 'root'. Thanks Elena.

1.1.0.0

Removed the cd to other folders per suggestion. Now, it stays in the folder where it was called. Also added ability to simply return all subfolder names only if a single root folder argument is passed.

1.0.0.0