the code is here
label_1 = '# Screw';
fid = fopen ('screw size.txt','wt');
fprintf (fid,'%s\n', Label_1 );
t = now;
folder1 = ['SCREW' nameProject, datestr(t, 'yyyymmdd')];
if (isfolder(folder1))
delete([folder1, '\*'])
else
mkdir(folder1)
end
save(fullfile(folder1, 'screw size.txt'), 'fid') ;
fclose (fid);