フィルターのクリア

Copying a file with specified extension to another folder

6 ビュー (過去 30 日間)
ANKUR WADHWA
ANKUR WADHWA 2019 年 11 月 4 日
I am writing an m-script to copy file from a source folder in C: drive (C:\matlab\) to the destination folder in D:drive(D:\matlab)
the paths mentioned are just for example and not the actual paths.
to get the location of the source and destination folder i am using asking user for input
My source folder is in C: drive and having couple of files like .txt , .mdl , .m etc.
I want to copy all the .mdl files in the source folder to my destination folder in D: drive
basepath = input('Enter base path','s');
targetpath = input('Enter target path','s');
filename = dir(*.mdl)
now with different trial with copyfile command seem to be not working for me
I allready fooled around with copyfile command , but couldn't get it to work,
request you to please provide a solution

回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by