AnsweredAssumed Answered

How to save a backup copy of the non current file.

Question asked by KenSutton on Jan 9, 2019
Latest reply on Jan 9, 2019 by KenSutton

I am developing a solution in filemaker that is broken up into 2 files. The second file contains the tables and data and the first file contains the scripts and Layouts. I want a script that will make a backup of both files whenever I choose.

I use the save a copy as and can make a backup of the 1st file correctly.

I then open the second file using the script and save a copy as and I end up with two copys of the first file.

I have used the select window to make sure the second file has focus.

 

Can you shed some light as to what i need to do.  Here is the script

 

Set Variable [ $BUName; Value:"file:WSBackups/WaterstreamsBU_" & Month(Get(CurrentDate)) & "-" & Day(Get(CurrentDate)) & "-" & Year

(Get(CurrentDate)) & ".fmp12" ]

Save a Copy as [ “$BUName”; Create directories:Yes ]

[ compacted copy (smaller) ]

Open File [ “DATA_Waterstreams” ]

Select Window [ Name: "DATA_Waterstreams" ]

Set Variable [ $BUName; Value:"file:WSBackups/DATA_WaterstreamsBU_" & Month(Get(CurrentDate)) & "-" & Day(Get(CurrentDate)) & "-" &

Year (Get(CurrentDate)) & ".fmp12" ]

Save a Copy as [ “$BUName”; Create directories:Yes ]

[ compacted copy (smaller) ]

Close File [ “DATA_Waterstreams” ]

Outcomes