Copy a prticular format file from multiple folders and their subfolders to one folder.
1 次查看(过去 30 天)
显示 更早的评论
So I have been trying to lean MATLAB for almost a week Now. I am trying to find a way to copy a prticular format file(can be csv or mat or png) from multiple folders and their subfolders to one folder. any help would be really appriciated.
Thanks
0 个评论
回答(1 个)
Image Analyst
2017-9-21
编辑:Image Analyst
2017-9-21
Gosh, a week? I admire your tenacity but if you're stumped for more than a day or two, ask us.
Simply use dir() with the ** pattern to get all files in all subfolders. Then use copyfile(sourceName, destinationName) to do the move. Here's a start in the attached file.
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!