7 Replies Latest reply on Mar 9, 2016 6:06 PM by user19752

    Are files in FM's temporary folder deleted automatically on FMS?

    RossHurley

      Hi all,


      I've search the archives, Help and Knowledge Base but can't find the answer to this. On a locally hosted file, container files saved to FM's temporary folder using Get (TemporaryPath) are deleted when the user quits FM. But what happens on FMS? Knowledge base says, "In FileMaker Server, each schedule runs in its own session; once the schedule is completed, the session terminates and the temporary folder is deleted". I'm confused by this. What is a session in FMS? I can't find any description in FMS Help or elsewhere. I am setting up a document management feature in a client's system, using Get (TemporaryPath) to save a container file to the temporary folder, then opening it for the user. The client is using FM13 on FMS13. So, my question is simple: on FMS, are files saved to the temporary folder cleared automatically, or must I take explicit action?

       

      Thanks,

      Ross Hurley

        • 1. Re: Are files in FM's temporary folder deleted automatically on FMS?
          RickWhitelaw

          No action required. As well, I believe files are save to the temp location on the client machine. Not the server.

          • 2. Re: Are files in FM's temporary folder deleted automatically on FMS?
            keywords

            I think the definition of a session is a particular user accessing and working with the database on the Server. When log in the session begins, when they disconnect, the session ends.

            I would be very surprised if the temporary folder is anywhere other than on the user's computer, but even if it is actually created on the Server it will be particular to that user and that session and will be crunched when the session ends.

            • 3. Re: Are files in FM's temporary folder deleted automatically on FMS?
              jbrown

              A schedule is, I believe, a scheduled script. When a script runs from the server, FMS opens the database virtually and does the script. Then closes.

               

              There was a video of Clay Maeckel, Chief Software Architect at FMI, somewhere in Europe I think doing a presentation on the Drago Engine. He brings up temp files and containers. Here are my notes from listening to it (more than once):

               

              1. 1 Temp Files are a big deal
                1. The server and client has a temp file per session per file (even WebDirect)
                  1. Which is why we need beefy machines for many users
                2. The concept of the real world is in the user's temp file (on client)
                  1. The data the user needs
                  2. If its not there, there’s a request to the server to get the data.
                3. When using a local file, the temp file isn’t used to hold data. FileMaker can access the file directly.
                  1. Which is why db gets corrupted if there is a crash.
                4. Container data files are downloaded to a cache folder on client (no temp version on host). As you access container files, the data is downloaded to the cache. Deleted when the file is closed.
                5. Temp files are encrypted
                  1. Use 32-bit key
                  2. Use 256-bit key when solution is EAR
                6. Deleted when the file is closed (Deleted on server and client machine)
                7. Temp file will look like a copy of the real file over time.

              This most likely applies to FMS 14, but I assume it applies as well to 13.

              • 5. Re: Are files in FM's temporary folder deleted automatically on FMS?
                user19752

                "using Get (TemporaryPath) to save a container file to the temporary folder, then opening it for the user"

                 

                If the user stay opening the file when quitting FM, the file in temp folder will not deleted.

                 

                But it is not problem usually.

                • 6. Re: Are files in FM's temporary folder deleted automatically on FMS?
                  RossHurley

                  Thanks for your responses. Several thought that the temporary folder was always on the user's hard drive. That is suggested in KB 6885 describing the Get (TemporaryPath) function where only local examples are given. This KB item also describes when temporary folders are deleted and, whilst it describes a different process for local files vs files on FMS, I take it that the basic process is the same: when the user closes out of the system, whether hosted locally or on FMS, all files in their temporary folder are deleted.

                   

                  I also agree with Keyword's suggestion that a 'session' on FMS is when a user opens files until they close out - I just can't find any documentation saying that.

                   

                  All I was concerned about was the buildup of temporary files with users opening container objects to view (using Get [TemporaryPath]) because they were not getting purged. I guess I was worrying unnecessarily. I just can't find any definitive statement in FM's documentation to this effect.

                   

                  Ross Hurley

                  • 7. Re: Are files in FM's temporary folder deleted automatically on FMS?
                    user19752

                    Your quote of KB in 1st post is saying about "scheduled script", and it is also applied to "Perform Script on Server". It is different than user's session. They use temp folder on server.

                     

                    User's temporary files are not purged until quitting FMP.

                    "In FileMaker Pro, the temporary folder and any files placed in it are deleted when FileMaker Pro is terminated. "

                    Get(TemporaryPath)

                     

                    If you have problem that "not getting purged", it is not cause of hosted or local.