How to copy files form one directory to another
20 ビュー (過去 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!