2 Replies Latest reply on May 22, 2014 11:53 AM by GordonRoland

    InsertFile script using directoryName rather than specific file.

    GordonRoland

      Title

      InsertFile script using directoryName rather than specific file.

      Post

           I am trying to construct a script for a container field) that will provide users with a FileChooser dialog to a specific directory, but not a specific file.  The list of files changes frequently and there is no one specific file that is "correct."  According to "Help" this should be easy:

                                                                                       
                                                               
      The absolute path to a target file or folder in Windows, beginning at the top level of the file system
                     
                          
      filewin:/driveletter:/directoryName/fileName
                                          

           However, I cannot get it to work. If I specify a file (filewin:/X:/Video/Nightline-2014-05-22-0.mov) it works as expected and inserts the file into the container field.  However, if I try to omit the file name (with the expectation of getting a file chooser) I get an error message telling me that: "The file "Video/" could not be found and is required to complete this operation."

           I have tried "filewin:/X:/Video/" "filewin:/X:/Video" and "filewin:/X:/Video/*.*" all of which give a similar error message.

           I am using FileMaker Pro 12 on Windows 7.

           Thank you,

           Gordon