Getting all file names at a given folder name

后端 未结 2 1352
轻奢々
轻奢々 2021-01-04 11:57

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

相关标签:
2条回答
  • 2021-01-04 12:22

    You should use the dir function. Like so:

    allFiles = dir( 'c:\my\folder' );
    allNames = { allFiles.name };
    
    0 讨论(0)
  • 2021-01-04 12:28

    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').

    0 讨论(0)
提交回复
热议问题