1 Reply Latest reply on Nov 28, 2012 1:21 PM by philmodjunk

    Auto rename file depending on field.



      Auto rename file depending on field.


           I am working on a database where users will upload many files. So when the user is uploading a file he has to write the name of the file in a  field named FileName, now how can I achieve this that when he uploads the file it should automatically rename depending on what is entered into the field of FileName. The file can also rename when exported or being downloaded by anyone. 

           Using FM 11 and FM 12

        • 1. Re: Auto rename file depending on field.

               The only built in method available to a FileMaker script for renaming a file is to use export field contents to make a copy of the file. The script step assigns a name to the file as a calculation so you can refer to your file name field at that time.

               To rename an existing file and not leave a copy with the original name, requires deleting that file after using export field contents to create a copy with a different name. Export Field contents, if it refers to an existing file, but does not specify a field from which to export, will delete that file.