2 Replies Latest reply on Apr 6, 2017 11:10 AM by danjamins

    Exporting Global Container Field To Windows Network Drive


      Hi All,


      I wrote a script that creates a set of folders on a network drive on one of our file servers.


      Now I have template documents stored in global container fields in my database, and once the folders are created on the network drive I would like to place these template documents into specific folders.


      Figured it would be easy enough to create a variable $documentPath with the following calculation:


      "filewin://FS1/Commercial/DanTestFolder/" & $account & "/" & $project & "/ProjectManagement/Budget/Budget Template Master.xlsx"


      I put this variable into the export field contents, and when the script runs I don't receive any error but when I go into the directory it doesn't have the spreadsheet as I expected.


      I've tried using the network drive letter name (filewin:/T:/) and that didn't work either so I tried the network path... I'm stumped.

        • 1. Re: Exporting Global Container Field To Windows Network Drive

          You should get an error message if the system cannot create the new file where specified.


          That makes me wonder if the file was created, but not where you looked for it....


          It also seems like you are creating from scratch the same capabilities built into External Storage for a container field.

          • 2. Re: Exporting Global Container Field To Windows Network Drive

            Nope, not for the same purpose as the container field. These are stored in a container field in the database, they are spreadsheet templates for our project management team to use for each project.



            Basically I am setting up a folder structure on our fileserver with all the subfolders they need, and then placing those template docs  that they use for every customer in the folders they want them in. These files are kept on the fileserver and not brought back into the filemaker database after they are sent to the file server.


            I did figure out a solution though using the Send Event script to use CMD to copy the files from a shared folder to the newly created project folders. Works fine.