Here's a simple way to change the name of a file in a container field:
Use Export Field Contents to export a copy of the file. The file path information that you use to export the file includes the name you choose to specify for that file. Thus the file can be renamed.
Now re-insert the file from the location to which you exported and you have the same file in your container field, but now with a specified file name.
You may find this thread and downloadable file dealing with $Path variables of interest: Exploring the use of a $Path Variable in Scripts
Thanks for the feedback. I thought of that but since Filemaker has no way to delete a file a user could end up with hundreds of files on their computer.
That's not the case. If you export to the temporary folder, the exported items are not retained. And you can set up system scripts that FileMaker can perform to delete specific files or all files in a directory from a computer if such is necessary.
I found that a command like this:
Set Field (ContainerName;Base64Decode(Base64Encode(ContainerName);$NewFilename)
is exactly what is needed. Renames the internally stored name on referenced containers as well as the actual name of the file itself where it is stored.