Move diary in file to newfolder
30 views (last 30 days)
Peter O on 6 Jul 2021
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