2 Replies Latest reply on Jan 6, 2015 7:00 AM by pdoak_1

    Import file Script



      Import file Script




      • Filemaker Pro Advanced 12.05v5
      • Mac OS X 10.10.1
      • Level: Intermediate/Advanced
      • Experience: 4 years


      I have a script which imports a file into a table. The script gets the file path from a variable in the format: filemac:/Macintosh HD/Users/path_to_file/filename.csv

      The file is an alias pointing to the actual file in another location on my hard disk. When the script runs, I get an error message saying unknown error:20401. If I replace the alias with the actual file and run the script, it imports the file as expected. If I import the alias file manually, Filemaker will import it but it just won't seem to do it via a script if the file is an alias. 

      Is this a bug or do I need to import alias files differently.

      Many Thanks


        • 1. Re: Import file Script

          Does leaving out the "filemac:/" text make any difference?

          Possible bug reports should be posted over in Report an Issue where they will then be seen by Techs that work for FileMaker inc.

          • 2. Re: Import file Script

            Thanks for the response Phil.

            If I remove the "filemac:/", it says that it cannot find the file.

            For those that are having the same problem, I have worked around it by using an applescript to get the original file location from the alias file. Here is the applescript:

            tell application "Finder"
                  set theFilePath to alias theFile
                  set HFSfilePath to the original item of theFilePath as text
            end tell

            I will report the issue as a bug