Copying all files from a certain extension from all subfolders to main directory
Show older comments
Hi,
I have nested folders from which I want to get all the files with a certain extension to the main directory, but right now haven´t been able to read from all subfolders:
I have been trying to use:
movefile('dir/S *.mdf')
but it doesn´t seem to check into subfolders
Thank you in advance for any advice.
Answers (1)
per isakson
on 28 Mar 2013
Edited: per isakson
on 29 Mar 2013
See
[Added 2013-03-28:]
On Windows something like
str = evalc( 'system( ''dir c:\temp\*.txt /S'' )' );
is possible. However, it remains some work to parse str
Categories
Find more on File Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!