Dynamic addressing of files and folders for inputting data
2 次查看(过去 30 天)
显示 更早的评论
Hi everyone,
Is it possible to create a dynamic path address in MATLAB for calling files and folders? For example we have unknown number of files where each one includes also unknown number of excel files. How is it possible to call these files and folders for a kind of processing? I need a way that somehow MATLAB recognizes the number of folders by itself and then call the files inside each folder for processing.
Many thanks, Sam
0 个评论
回答(2 个)
Arturo Moncada-Torres
2013-12-2
excelFiles = dir(fullfile(pathToDirectory,'*.xls*'));
Then, you can access the file names as
excelFiles(:).names
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 File Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!