Over 46,000+ Business Solution Developers Find answers, ask questions, and connect with our community of business solutions developers, business owners and partners.
Rename FileMaker Container Files without Exporting/Importing – FileMaker Today
Here is a classic read from Jan Stieperaere at Clickworks…Rename your container files without exporting/importing. Fully native FM13-14. Works in WebDirect, Server, Go, …
How It Works?
This technique makes use of FM13’s new Base64Encode() & Base64Decode() functions. When decoding a base64 string, filemaker gives you an optional parameter to specify a filename. This is the key to rename your container file.
The total function looks like this:
Base64Decode ( Base64Encode ( Table::Container ) ; “NewFileName” )
The example file ( see link at the end of article ) works with a script who renames the file and replaces the original container file. But you could also apply it as an auto-enter option to unify all your container object filenames…
Why use it?
Not only because it is clever and you can impress your teammates. It is the only solution that works in WebDirect!
For large container files, it takes a long time to encode/decode the file. Tested on Mac with SSD drive: container 100MB: 30sec. But you could use ‘Perform script on server’ to offload it to the server machine…
Douglas Wallis, Responsable Technique – Southern Europe FileMaker, explaines why & how to workaround the issue with compressed containers:
“The reason there is a difference between the MD5 values from the uncompressed and compressed containers is that the files are actually different. In the example from Vincent, the name of the uncompressed file is « Apple.txt » whereas the compressed file is « Apple.txt.gz ».
So when you rename a compressed, you should actually get your script to rename the file from Apple.txt.gz to NewName.txt.gz . That way, you keep the same file format and at least the file can be exported from FM and used.”