Jump to content
Sign in to follow this  
Dono K

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...

Share this post

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.


Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...

Important Information

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