Effacer les filtres
Effacer les filtres

Copying multiple files to a location using wildcard

15 vues (au cours des 30 derniers jours)
James hall
James hall le 12 Sep 2012
Hi,
How can I use the copyfile command to copy multiple files of extension '*.csv' to a specific location?
I tried this but it gave errors:
copyfile(fullfile(RawCSVfolder,'*.csv'),ProcessedFoldersDirectory);
Thanks,
  1 commentaire
Sean de Wolski
Sean de Wolski le 12 Sep 2012
What errors? Please post the whole error message.

Connectez-vous pour commenter.

Réponses (1)

Srinivas
Srinivas le 12 Sep 2012
As per the help document
copyfile('Projects/my*','../newProjects/') so it should be
copyfile([RawCSVfolder '\*.csv'],ProcessedFoldersDirectory);
HTH
  3 commentaires
Walter Roberson
Walter Roberson le 13 Sep 2012
What value does ProcessedFoldersDirectory have at that point? Is it possibly the value 0 ? Or possibly a cell string rather than a plain string?
Aadil
Aadil le 13 Sep 2012
yup these should be in curly brackets, made this mistake too many times:
RawCSVfolder=RawCSVfolder{WhichLocation};
ProcessedFoldersDirectory = ProcessedFoldersDirectory{WhichLocation}

Connectez-vous pour commenter.

Catégories

En savoir plus sur Data Import and Analysis 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