Move diary in file to newfolder

조회 수: 29 (최근 30일)
armin m
armin m 2021년 7월 6일
댓글: armin m 2021년 7월 6일
Hi.I export my output file to diary file.I want each time i run the code, matlab move diary file to a newfolder and rename the folder name to date and time of running can i do?

채택된 답변

Peter O
Peter O 2021년 7월 6일
Hi Armin,
Try this at the start of your code. You may need to ensure the path exists before creating the diary file. You should get an error if that's the case, use mkdir for the path.
mypath = 'diaries'
myfile = "mydiary_" + datestr(now,30) + ".txt"
filepath = fullfile(mypath, myfile)
% Print location of diaryfile
  댓글 수: 8
Peter O
Peter O 2021년 7월 6일
Not possible, unfortunately.
armin m
armin m 2021년 7월 6일
Thank you alot

댓글을 달려면 로그인하십시오.

추가 답변 (0개)


Help CenterFile Exchange에서 Entering Commands에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by