1 Reply Latest reply on May 30, 2013 8:14 AM by philmodjunk

    Import multiple files at once

    mmccarty

      Title

      Import multiple files at once

      Post

           Hello,

           I'm building a simple database to organize my photos.  Each photo is put into a container field.  I would like to write a script to speed up the process of entering my photos into FM.  I would like to point FM to a folder and have FM loop through all the photos in the folder creating a record and adding the photo to the container field.  

           What I want to avoid is having to point FM to each photo in the folder (aka dialog box for each photo).  Right now that is all I can do.

           Any ideas?

           Thanks

        • 1. Re: Import multiple files at once
          philmodjunk

               Use a script with Insert field or insert picture to insert a single file from your folder with the "store a reference" option enabled.

               Then have your script extract the file path from this container field, putting this path in a $path variable with the file name removed so that it is just a path to the folder.

               Then use this $path variable with Import Records | Folder to import all the images in the folder.

               If you set this up correctly, you get a dialog where you select one file from the folder, but the script then imports all the images from it, not just the one you selected.

               This thread on file paths, path variables and container fields may be helpful: Exploring the use of a $Path Variable in Scripts