RenameContainterFile ( ~FQFN ; ~NewFileName )
This Function will rename the file contained in a container.
Average rating: 4.6 (24 votes) Log in to vote
Mark Geerdes - Show more from this author
Technology By Design https://www.tbdmn.com |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
This function will take the fully qualified field name of the container field, and the new file name and will rename the file that is contained in the container. Because it uses the Base64 functions, it is a little slow, so it might be best practice to Perform Script On Server. If the containers are compressed, you need to add a .gz to the end of the new file name in order to make it work correctly.
Parameters: Fully Qualified Field Name of Container, New Name of File
Created 12/29/2014 - Mark Geerdes
Comments
David Dec 9, 2015 |
||
Wonderful find. It even works with externally stored containers. It changes the internally stored name as well as the name of the document itself. 5 Stars | ||
Bob Nov 17, 2017 |
||
Do you have Script | ||
Mark Geerdes, Technology By Design Nov 18, 2017 |
||
Not sure what you mean. You will need FileMaker Advanced to import the custom function into your file. Then in your script, do a set field command to the container field. In the calculation box, use the name of the Custom Function, and give it the parameters as shown above. | ||
Eric, SJSU Jul 31, 2019 |
||
"RenameContainterFile". Did you mean "RenameContainerFile"? |
||
Gary, GC Consulting Aug 15, 2020 |
||
Genius! Exactly what I needed. I had > 100’000 weird image file extensions and when I changed them, voilà — the FileMaker showed all the images! |
||
jeremy sterritt Jul 12, 2022 |
||
Works like a charm! I'm curious about David's comment above: "It changes the internally stored name as well as the name of the document itself." I would love to change document names this way, but I don't understand how it would work... | ||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.