john9210 Posted August 11, 2008 Posted August 11, 2008 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?
Fitch Posted August 11, 2008 Posted August 11, 2008 You already answered your own question: the OS doesn't allow it.
Vaughan Posted August 12, 2008 Posted August 12, 2008 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.
Oldfogey Posted August 12, 2008 Posted August 12, 2008 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.
Recommended Posts
This topic is 5949 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now