How to exclude a file type when using copyfile?

조회 수: 2 (최근 30일)
Karim
Karim 2014년 11월 11일
편집: Image Analyst 2014년 11월 11일
I need to create a script that copies all files from one directory to another, excluding a certain file type (in this case, *.bin)
Additionally, it is not sufficient to simply copy the files over, I need to keep the folder hierarchy structurally the same.
How can I do this?

채택된 답변

Image Analyst
Image Analyst 2014년 11월 11일
편집: Image Analyst 2014년 11월 11일
Use dir() as shown in the second code sample in the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F. Combine with fileparts() and strcmpi() to exclude bin extensions.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by