I am using matlab file in which i am able to create the new folder according to the time, but the thing is i want to copy the files from a specific file to this newly made folder according to time.

2 views (last 30 days)
dfile=[datestr(now,'mm-dd-yyyy HH.MM.SS'),'folder']; mkdir(dfile);
this is my code for making new folder with time, how to add some files from specific location/folder to this newly made folder. It should be like every time we make new folder those files should be included.
thanks

Accepted Answer

KL
KL on 22 Nov 2017
  3 Comments
KL
KL on 22 Nov 2017
mkdir makes new folder. You have already used mkdir(dfile).
I suggest to use copy file after that.
copyfile('yourfile.m',dfile)

Sign in to comment.

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!