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