May 16, 201114 yr I'd like to create a FM 11 script that backups the current open file. It would save the file to a specified folder, and the file name would include the name of the open file, the date and time created. Any suggestions on how I could do this?
May 16, 201114 yr The "Save a Copy" command lets you use a variable as the path, so in your script you would first define the variable and then use it to save. E.g.: Set Variable( $path ; Let( t = Get(CurrentTimestamp) ; Get(DesktopPath) & Get(FileName)& "_" & Year(t) & "-" & Month(t) & "-" & Day(t) & "_" & Hour(t) & Right( "00" & minute(t) ; 2 ) & ".fp7" ) ) Save a Copy as( $path ; compacted ) Notice that we need to pretty up the timestamp, since slashes and colons are not generally permitted in file names. (And it's nicer to sort your backups when the year comes first.)
May 17, 201114 yr You won't have the option to do it if you are the client of a shared file. Are you saying you shouldn't do it if you are the host? Why not?
May 17, 201114 yr You're right, Fitch, Save a Copy is an approved method to backup a hosted file (peer-to-peer, not FMS).
Create an account or sign in to comment