Changing file names to reflect date
이전 댓글 표시
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
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Dates and Time에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!