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.

Respuestas (1)

per isakson
per isakson el 28 de Mzo. de 2013
Editada: per isakson el 29 de Mzo. de 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

Categorías

Más información sobre File Operations en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 26 de Mzo. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by