4 Replies Latest reply on Sep 4, 2014 11:35 AM by BowdenData

    Disappearing Temp folder?


      We have a client, using FMS13 and FM13, Windows, using 360Works' Scribe and ScriptMaster.


      Tuesday, several users reported a number of issues. Things had run fine Monday, and we'd made no changes, so it was a bit of a head-scratcher. After much troubleshooting, we discovered that for several users, the temporary folder identified by get ( temporarypath ) simply wasn't there. We use that folder for juggling files (such as pdf's we populate with Scribe) and for various import/export routines that create records from templates.


      We've added steps, with ScriptMaster, to check for the folder and create it when necessary, so the immediate crisis is averted, but we've not determined the root cause. Deleting that folder programatically from FM (using ScriptMaster) is a pretty deliberate effort, which we didn't do, and finding and deleting that folder manual would be a pretty deliberate action by a user, especially considering that this happened on multiple machines (including the server, where we connect via Remote Desktop Connection).


      Has anyone else experienced this oddity, who could perhaps suggest what may be the cause?


      Chris Cain

      FM13 Certified Developer

      Extensitech, LLC



        • 1. Re: Disappearing Temp folder?

          My understanding is that if you use Get ( temporarypath ), FM simply creates a temporary folder in its default location—which the user need not, and possibly ought not, even be aware of—uses it as required, then destroys it when the file which created it is closed (or when you quit FM, I'm not quite sure which).


          If you want a temp folder created in a location of your choosing which persists, then you have to create it and explicitly navigate to it, not via the temporary path function.

          • 2. Re: Disappearing Temp folder?

            Be design, the temp folder gets created just for the duration of a script.  When the script ends the temp folder is no longer.

            • 3. Re: Disappearing Temp folder?

              The temp folder gets created when needed, even if I just put get ( temporarypath ) in the data viewer. The folder persists until I quit FileMaker. I've just verified this behavior on my own computer.


              On the computers in question, though, the temporary folder wasn't getting created, and the subsequent steps (for example, to export to that folder) were failing.


              So perhaps I should reframe the problem. I guess the temp folder isn't actually disappearing. It's just not getting created in the first place. Get ( TemporaryPath ) shows me a folder name, but that folder doesn't get created in the temp directory.


              (I have a strong feeling that this is environmental, since the same scripts, and same uses of the temp folder, work fine on our local machines, and in fact worked fine on their machines up through Monday night.)



              • 4. Re: Disappearing Temp folder?

                I assume that the users/machines in question have been fully rebooted as a troubleshooting measure? Did some new patches or updates get applied to the machines in question prior to the issue surfacing?


                Some FYI on the FM Temp folder based on my testing (on a Mac)


                Correct on the FM specific temp folder in that it gets created on first use of Get (TemporaryPath) function and persists until the FM application is quit.


                FM specific temp folder called "S10" gets created. If the FM application crashes or is force quit, S10 (and contents) folder remains.  If you reopen after a crash and do something to create a FM specific temp folder, it creates a new one as "S10.1" and uses that for storage. When you quit the FM application, the folder S10.1 will be deleted, but not S10. Logging in and out of the user account will NOT remove the S10 folder. Only a full restart (or obviously shutdown/startup) of the machine will clear out the "S10" folder.