So we have a runtime solution (windows only at this time) , data and interface in single file (no data separation) and we have just changed all container fields that are accessible to the end users to now use external (open storage).
The issue is when saving a backup i use a script to save a copy of the file as self-contained, when i "reformat" the runtime app to have no records and restore from a backup file via script all data is imported except for the container data. So the container data is not being embedded back into the fields as it should, This bug has been reported since as far back as at least FM14 and has persisted in every FM since including 18. I have tried removing the Full access account and disabling any auto sign in feature in file options, i tried replacing script step "Insert Picture" with "Insert file" with store as reference unchecked. at this time i see no functional use for self contained copies unless i am doing something wrong (as well as many others based on the amount of forum threads on the issue).
If anyways knows what i may do to make this work i'm open to trying out some things, otherwise does anyone know how i can run a backup both the data file and external storage folder together using a script with maybe a batch file or something. To be honest though my level of understanding on using batch files and the "Send Event" script step is fairly beginner. We have come up with this for a batch script, The file is called Backup.bat and the code is:
cmd /c MD C:\BackupTest
XCOPY C:\"Program Files (x86)"\"My App"\My App.fmp12 C:\BackupTest /y
XCOPY C:\"Program Files (x86)"\"My App"\"External"\*.* C:\BackupTest\External\ /s /e /y
REN C:\BackupTest\My App.fmp12 My App.fmp12_%date%
Running this .bat file from the desktop does exactly what we want but would like it to be run automatically in a FM script, Im guessing using the script step "Send Event" is the way to do it but placing the code in Send Event step as text runs, no errors but it actually doesn't backup the files as its supposed to, I tried placing it in the calculation fields but keep getting errors within the calculation due to the added quotes as well as the backslashes, cause backslashes escape quotes and all and I need the quotes used in the code in order for it to work.
I will say that using send event with the File option and targeting the backup.bat file we created works great, does the backup, but the issue is our end users use different backup paths for saving copies and use global fields in a preferences table to determine store these paths, So using the calculation portion of the send even is what we need so we can use this global field in place of the destination path for the .bat file to copy the files to. Has anyone done anything like this? can anyone help me figure out how to modify the above code so its friendly with the filemaker calculation engine and can be dynamic to the users custom path settings, I tried putting the above code into a $$variable and using the $$variable in the calculation field (send event) but that did not work either. I believe if we can get this working it would be a great solution to replace the self contained file issue many seem to have.
I have read: https://filemaker.jiveon.com/thread/137765?commentID=472199#comment-472199 and https://filemaker.jiveon.com/thread/167056 and a few others but they did not help.