During my last project I had to create a new SubFolder within some snapshots I made.
The intention was to create a new Subfolder for every run of the program without using a variable.
Maybe it's not the best solution but it works=)
I hope this might help if you have to do anything similar.
DateString = datestr(now,'dd_mm_yyyy_HH_MM_SS');
newSubFolder = sprintf('path of your parent folder\\Data-%s', DateString);
if ~exist(newSubFolder, 'dir')