Getting all file names at a given folder name

我与影子孤独终老i 提交于 2019-12-30 06:03:09

问题


How can I get the names of files in a given folder name at Matlab?


回答1:


You should use the dir function. Like so:

allFiles = dir( 'c:\my\folder' );
allNames = { allFiles.name };



回答2:


If you're on linux you can call the find command and process the output. find allows for much more advanced features than just using dir, and can be called using system('find path').



来源:https://stackoverflow.com/questions/5803915/getting-all-file-names-at-a-given-folder-name

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!