Jump to content
Server Maintenance This Week. ×

Renaming image files in remote container?


This topic is 3682 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I am running FM Server 12 Advanced. I have a container field with it's images being stored externally in a folder on the same server. I have a text field which contains the new name that I would like to apply to each photo. Can I rename the files from a client running on a different computer?

 

I found this thread from a couple of years ago which explains a way that this can be done with the 30works Scriptmaster plugin.

 

Can some please explain how to create the function that he is referring to in this comment? I do not have any experience with creating custom functions and it's not clear to me how proceed. Thanks.

 

There is an object ScriptMaster creates and has access to (fmpro) that can be used to accomplish this.

You'll use two input parameters ("fully qualified original container field name" and "new filename"). The code is extremely simple:

return fmpro.getAsContainer(fmpro.getContainerStream(fieldName), fileName);

Once you have created the function you'll want to call it using a Set Field step on the output container field. The result of the function is FM Binary and the filename. You can add use the ScriptMaster sample file to test this.

Link to comment
Share on other sites

This topic is 3682 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.