August 11, 200817 yr I use the following script steps to create a backup my FM file that includes the date: Set Variable [ $DateAsString; Value:Right("00"&Month(Get ( CurrentDate ));2)&"-"& Right("00"&Day(Get ( CurrentDate ));2)&" "& Right("00"&Hour(Get ( CurrentTime ));2)&"-"& Right("00"&Minute(Get ( CurrentTime ));2)&" "& Year(Get ( CurrentDate ))&" " ] Set Variable [ $filename; Value:"BACKUP "&$DateAsString&Get ( FileName )&".fp7" ] Show Custom Dialog [ Title: "Create backup"; Message: "Do you want to make a backup of this file? It will be located in the parent directory."; Buttons: “OK”, “Cancel” ] If [ Get ( LastMessageChoice )=1 ] Save a Copy as [ “$filename” ] [ compacted copy (smaller) ] End If However, since filenames do not accept the / and : characters, I’ve had to use the format 8-11 for month-day and day and 15-22 for hours and minutes. I would like to use the familiar 8/11 and 15:22. Is there a way I can do this?
August 12, 200817 yr I'll jump in and suggest that dates for files should always be in the format YYYYMMDD because they can easily be sorted in chronological order.
August 12, 200817 yr I'll jump in a bit deeper and suggest avoiding any special characters in file names - unless you have an excellent memory and remember which ones are OK.
Create an account or sign in to comment