john9210 Posted May 16, 2011 Posted May 16, 2011 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?
Fitch Posted May 16, 2011 Posted May 16, 2011 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.)
bcooney Posted May 16, 2011 Posted May 16, 2011 Be aware that you shouldn't do this with a shared file, only single-user.
Fitch Posted May 17, 2011 Posted May 17, 2011 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?
bcooney Posted May 17, 2011 Posted May 17, 2011 You're right, Fitch, Save a Copy is an approved method to backup a hosted file (peer-to-peer, not FMS).
Recommended Posts
This topic is 4939 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