How to copy files form one directory to another
조회 수: 21 (최근 30일)
이전 댓글 표시
Hi,
I want to copy all files from one folder to another folder. How can I do this using arrayfunc ?
sorce_folder files:
s1.csv
s2.csv
s3.txt
and destination_folder:
d1.csv
d2.txt
d3.txt
I want to copy all the files in source_folder to destination_folder using arrayfun.
댓글 수: 1
Stephen23
2020년 2월 5일
Do the files have to be renamed as well as moved? If renaming is not required you could probably do this with one command.
답변 (1개)
Stijn Haenen
2020년 2월 5일
cd('source_folder')
filenames=dir;
for i=3:length(filenames)
copyfile(filenames(i).name,'destination_folder')
end
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Adding custom doc에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!