how to copy multiple files from a source folder to a destination folder
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi, I was looking for how to copy multiple files from a source folder to a destination folder (subfolder) without looping through file names. Wild card copies unnecessary files. eg if a folder contains "cat.txt,mat.text, dog.txt,pmpo.txt" ... how to copy cat.txt and mat.txt to another folder(subfolder without using a loop.
thanks in advance
0 Kommentare
Antworten (2)
Image Analyst
am 3 Dez. 2015
You can use one of the code samples in the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F
Then, inside the for loop, use sprintf() and fullfile() to create the full filenames (folder+base file name + extension) and then use copyfile() to do the copying.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Environment and Settings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!