Changing file names to reflect date
Show older comments
I am generating pdfs based on data that is being read in. I need to use a certain naming convention based on the date. Getting the data I need from the clock funtion is working fine.The problem I am encountering is that some of the functions being used only accept strings has there input and I am unable to change them.
Attempt 1
fv0 = strcat('RM13',num2str(day(1)),'.000', num2str(day(2)))
system('move a.pdf fv0.pdf');
Here I am trying to change the file a.pdf (which contains the processed data) to the naming convention I want but the system function only accepts string inputs I can not update the name.
Attempt2
m6=strcat('SVC_1B_pqpf_',num2str(day(2)),num2str(day(3)),'_13',num2str(day(1)),'.pdf');
print -dpdf m6
Here I am attempting to change the file name as soon as it is written
Note that day is a vector containing the formatted date from clock
Accepted Answer
More Answers (0)
Categories
Find more on Dates and Time 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!