1) No matter how you approach this, you are moving huge amounts of data into and out of FileMaker and the file itself will balloon in size or shrink when you run one of these scripts. This will take a lot of time to accomplish for "many 10,000's" of records.
2) With Filemaker 12, check out the new option in Save A Copy As... where you can specify a "self contained copy" in the lowest drop down in the dialog. This option is supposed to embed copies of the files into container fields with the external storage option.
I had thought the " Save A Copy As... where you can specify a "self contained copy" in the lowest drop down in the dialog" would do the conversion to hold the actual files in the containers (for transfering to FM Go); hence I would not need to do it by scripts. But it does not seem to do anything with my solution. After transfering to FM Go, all containers show the dreaded "missing file".
Did you trans fer the original file or the copy you produced with this method?
I transfered the copy, without opening it on the desktop, as this would set all containbers back to holding a Reference to Files.
It has nothing to do with whether you open the file on your desktop machineor not.
As far as I have been able to determine, externally stored container files are not supposed to be inserted with the store a reference option. If they are, they are not stored in the external location and thus are not converted to embedded when "save a copy as" is used to produce the self contained copy.
As a test, I saved a copy of a test file with the "self contained" option. If the files were not inserted with the "store a reference" option, they show in the copy as embedded files. But files inserted with the "store a reference option" remain as references in the new copy.
Thanks again, it has taken me awhile to figure it out. It is as you have responded. in Fmp12, for a container, if store as a "Reference to File" is selected, then automatic store to External Storage (Remote) does not occur.
Thanks, You have been most helpful.
1) Inserted Actual Files in all containers using a script, and actually verifed that the actual files are there. 2) Changed every container to External Storage and effected the transfer. 3) Save a Copy As .... self-contained (single file).
Result: in the new copy files in container are not inserted as Actual Files. (In my solution have created a custom menu, I wonder if the "Save a Copy As .... self-contained (single file)" is the problem, will check it out)
Before posting here, I tested this with a smalll test copy and it worked for me. I had to be sure that the following was true for each container field and each file inserted into them.
External storage had to be specified
Store a reference was NOT used when inserting the file.
I also created a new test file, and created a custom menu, followed the steps to set up External Storage (and specified), store a reference is not used.
Result: The test file works correctly the actual file is stored in the container after "Save a Copy As .... self-contained (single file)" is performned. However, in my solution, the the containers do not hold the actual file after "Save a Copy As .... self-contained (single file)" is performned.
In mine, the new copy of the file has embedded files in the containers. In this screen shot, I've saved a self contained copy, removed the folder into which the externally stored files were copied, and then opened the copy of the file.
The images remain in the container fields, but this copy does not use external storage as shown in the manage database window.
In a test file I created everything works correctly. It looks like my previous 2 post a few minutes ago has been lost... But with my original solution after setting it up External Storage and effecting the transfers, containers typically have the following:
JPEG:file_/Macintosh HD/Users/rouelf/Documents/YR Documents/ImgFile_3.jpg
Which I believe should be correct for a not using Reference to Files.
After Save a Copy as Self-contained copy (Single File), it should have: ImgFile.JPG; but it does not, the container has the same as above. Have been using a MAC, will try to see what happens on Windows machine.
Checking on my Windows XP platform, I get just the file name as the extractble text from a container field--what I would expect for embedded files.
Have performed the same steps to use Exterrnal Storage with a Windows XP platform, with the same problematic result as on the MAC. in my solution the Save a self-contained copy (single file) does not insert the actual file in containers.
Don't know what to try next. Will think on it.
BTW, still can't figure out how to point (using a script, or ...) the Base Directory to my solution Created Folder. Specifying in the External Storage option for open storage, simply creates a new set of folders to hold the content of containers in the same directory as the where the file is opened from.
Apologies in advance, but it sounds like you are not checking the file created by Save A copy as, but rather the original file.
BTW, still can't figure out how to point (using a script, or ...) the Base Directory to my solution Created Folder.
The file path you enter would need to be the fully qualified file path. On a windows machine, that would be a filepath that starts with a drive letter. On Macs, it would start with a volume name.