How do I grab the files names from a directory and store them in a matrix?

13 vues (au cours des 30 derniers jours)
Laurentiu Galan
Laurentiu Galan le 4 Nov 2011
Hi Guys,
I have a bunch of file names in a directory...call it c:\output
They are formatted YYYYMMDD. A sample one is 19870824.csv. There are about 4000 different files. How do I grab the file names and store them in a matrix?
-Larry G.

Réponses (2)

Fangjun Jiang
Fangjun Jiang le 4 Nov 2011
Files=dir('c:\output]*.csv');
Files.name
Files is a structure array containing the file name and other info.

Walter Roberson
Walter Roberson le 4 Nov 2011

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by