Jump to content

Insert Images in folders to container field

Recommended Posts

Hello - I have folders of images I want to create a script to insert into a field.  The folders each are named that match a field "Rug Number" like this (where "1001" is the contents of field name: Inventory::Rug Number


I want the script to insert the image file contained in folder rugs1001 - no matter what the name is (all the folders only have one image).

Can I do this? I tried various variables, but am not getting the syntax right. And I don't know if I can just grab any image out of a folder...

Link to post
Share on other sites

I don't think it's possible to insert a file/image into a container field without knowing the file's name, in addition to the path.

You could import all images into their own table, extract the rug number from the imported path, and use this to create a relationship to your existing table.

Alternatively, you could use the BaseElements plugin to get the file name, using its BE_FileListFolder() function.  

Or, if the folders are within your Documents folder, you could use the built-in Get(DocumentsPathListing) function to get a list of all pathnames; then extract the one you need from there.


Link to post
Share on other sites

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.