image thumbnail

文件夹树文件列表

version 1.1.0.0 (8.63 KB) by Nikolay S.
Returns cell array of file names located under input folders.

1.3K Downloads

Updated22 Apr 2013

View License

This functions goal is to return a cell array of names of files located under user defined folders. The input should be a cell array of parent directories. The function also supports input of a single directory name string. Absolute file path is used, replacing the relative path.
用户可以通过启用“ flaggui”输入来选择使用OS Explorer-的文件或目录。
我提出了一些与MATLAB文件交换的多个类似功能的未兴趣(没有犯罪,对作者及其工作,没有犯罪):
-//www.tianjin-qmedu.com/matlabcentral/fileexchange/index?term=tag%3A%22directories%22&sort=downloads_desc
-//www.tianjin-qmedu.com/matlabcentral/fileexchange/index?term=tag%3A%22files%22&sort=downloads_desc
-//www.tianjin-qmedu.com/matlabcentral/fileexchange/index?term=tag%3A%22dir%22&sort=downloads_desc
在我的第一个编程课程中,我被教导说使用递归的代码是不良的代码。递归代码很难理解,开发和维护。
Changing folders or Matlab path during run time is also a bad thing- it takes more time and can cause unwanted effects in Matlab environment.
Therefore I've written my implementation, witch, I believe, has some advantages over methods proposed earlier:
- It is not recursive but iterative.
- It does not changes the current folder (not using cd command).
- 它使用“ LS”函数,该功能应该比“ DIR”函数更快。
- According to some measurements I've made it runs faster the the alternatives.
- I also believe is is clearly written, so it should be easy to understand and maintain.
- It supports wildCards.

Cite As

Nikolay S. (2022).文件夹树文件列表(//www.tianjin-qmedu.com/matlabcentral/fileexchange/41170-folders-tree-files-list), MATLAB Central File Exchange. Retrieved.

MATLAB Release Compatibility
Created with R2012b
与任何版本兼容
Platform Compatibility
视窗 macOS Linux

Community Treasure Hunt

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

开始狩猎!