Copying all files from a certain extension from all subfolders to main directory

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)

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

Tags

Asked:

on 26 Mar 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!