aldipalo Posted September 4, 2007 Posted September 4, 2007 Can you or how would you have a dynamic file name in a Save As script step? Currently my db is backed up daily to the same named file. I've come to realize this is REALLY NOT a good way to do things. If My back up is corrupted it is my only copy. So I would like to save a copy of my files with a changing file name e.g. contacts942007.fp7; contacts952007.fp7, etc. Any ideas, suggestions. Thanks.
Vaughan Posted September 4, 2007 Posted September 4, 2007 Firstly you should really be using FileMaker Server. If you are, the Save a Copy As command is disabled because FMS is responsible for backing up the files. Read more in Wim's excellent document: www.connectingdata.com/MoreBackups_v2.pdf
aldipalo Posted September 5, 2007 Author Posted September 5, 2007 Thanks Vaughn: However, this is a stand alone app or a runtime app. I don't have fmServer. That's my next thing when I have an extra couple of thou to spend. : Any other ideas? I just bought a 500 gb USB drive. My LAN Server went last week. Both HD's are being replaced. I also lost my dev server, my WAN Server and my SQL server in the last month. It was time they were all about 6 - 7 years+ old. That's the fun of living in the TampaBay area of Florida. "The lightning capital of the world!" We call it "fireworks by God. :)" Fortunately I had backUps, but, that's what got me to thinking about my fm files. What I've just done, today, is set up a global field to hold the DayName. I then created 7 folders for each day of the week. So I made a script with 7 If statements. I was hoping there was a more elegant way to do this. TIA
David Jondreau Posted September 5, 2007 Posted September 5, 2007 You declare your filepath as a variable using Set Variable. It depends on where you save the backups and your OS, but, for example you can: Set Variable [$filepath;Left( Get(FilePath); Length( Get (FilePath)) - 4) & Right(0 & Month(Get(CurrentDate));2) & "_" & Right(0 & Day(Get(CurrentDate));2) & "_" & Year(Get(CurrentDate)) & ".fp7"] Then when you specify an output file for the Save As, you put in $filepath. Save as a Copy[$filepath;compacted] Gives you a file named "filename_09_04_2007.fp7" in the same folder as the file.
gephry Posted November 21, 2007 Posted November 21, 2007 I'm developing something in FM7 and have been trying to use a similar "Save As filename scheme" to archive my own backups as I develop the database. I am assigning the path/filename to a global field. But, it won't recognize the field name when I use the field in the Save As script output. ....can I do this with a field or does the Save As only accept $Variables (of course only being available in FM8 and above)?
Recommended Posts
This topic is 6214 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