September 24, 20196 yr 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 image:../files/rugs1001/AS-412-4,DESIGN,PLAIN,SIZE,3.10X6.1.JPG 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...
September 24, 20196 yr 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.
Create an account or sign in to comment