1 Reply Latest reply on Mar 1, 2010 2:07 PM by RickWhitelaw

    Get(TemporaryPath)

    RickWhitelaw

      Title

      Get(TemporaryPath)

      Post

      Hi,

       

      In some scripting I had been saving pdf's to my desktop temporarily, printing, and then automatically deleting the files. I decided that saving them to the Temporary Path would be smarter, as the files would be cleaned up automatically without further scripting. However "Get(TemporaryPath)" is returning a folder that doesn't exist and my shell script, of course, won't print from it. Oddly, using the Save Records as PDF step with a variable file path, value is Get(TemoraryPath)&"myfile.pdf" does not return an error in FMPA even though, after canceling the script (but after "saving pdf"), the pdf is nowhere to be found. Printing, via lpr, does produce an error; "directory . . . . .not found" (or "does not exist"). So, FMPA apparently has no problem with a directory that doesn't exist, the OS definitely has that problem, and the pdf's are nowhere even though FMPA seems to have had "no problem" saving them.

       

      From Help, the Temporary path is defined as:  /DriveName/private/var/tmp/folders/501/TemporaryItems/FileMaker/S<n> where DriveName is the name of your hard disk.

      Currently, Get(TemporaryPath) is returnung "/System 250/private/var/folders/4D/4DANsW03HG0DdU1dyriORE+++TI/Cleanup At Startup/S10/"

      "/Cleanup At Startup/S10" does not exist on my drive.

       

      RW

       

      FMPA 10v3

      Mac OS X 10.6.2

      bash shell

        • 1. Re: Get(TemporaryPath)
          RickWhitelaw

          Replying to my own post because I've found out what's going on.

           

          "Currently, Get(TemporaryPath) is returnung "/System 250/private/var/folders/4D/4DANsW03HG0DdU1dyriORE+++TI/Cleanup At Startup/S10/"

          "/Cleanup At Startup/S10" does not exist on my drive."

           

          Although the function is not returning what's expected, the folder "Cleanup At Startup" exists as an invisible folder nested into "var" which is itself an invisible folder, and FMPA creates "S<n>" when needed. It's still odd that the TemporaryPath is not what it should be, and that although I can use "Go to folder" to find this directory, a shell script insists it doesn't exist.

           

          I'm going back to using the Desktop as my (scripted) temporary path and scripting the deletion of the file as soon as it's sent to the printer.

           

          RW