7 Replies Latest reply on Jul 16, 2009 1:43 PM by ronhofius

    Server 10: Running Automated System Scripts (Windows Batch Files)

    ronhofius

      Title

      Server 10: Running Automated System Scripts (Windows Batch Files)

      Your post

      I must be missing something obvious, but I'm trying for the first time to get rid of some of my robots and run scripts server side.  All works fine for FM scripts, but I'm trying to use the feature where I can run a batch file after a FM script completes.  When it comes to specifying the script, I just get a little "-" in the dropdown.  How do I specify the batch file to run?

       

      Thanks,

      Ron

        • 1. Re: Server 10: Running Automated System Scripts (Windows Batch Files)
          philmodjunk
            

          There's a folder for locating such scripts and the drop down lists all files stored in this "scripts" folder. Have you placed your batch file in this folder?

           

          BTW I still use a robot for some of my automated tasks because server side scripts can be very limited in capability. Hopefully you're having better luck.

          • 2. Re: Server 10: Running Automated System Scripts (Windows Batch Files)
            ronhofius
              

            Thanks.  That was just the nudge I needed.  I had to drill into the default folder structure to find it, though.  Is there somemwhere I can configure this folder location like I can for my databases and backups?

             

            So far I am able to get everything done that I was doing with a robot.  The big enhancement is the ability to import and export.  I am also creating a calculation field to construct a command such as "del f:\foldername\filename.jpg /Q" and exporting that field to a batch file in the folder you told me about to clean up orphaned jpegs when their container record was deleted.  The automated script that deletes these records first exports that field to the batch file, then the batch file runs when it completes. 

             

            The other enhancement I like for this is the "Show Compatibility" options in the "Manage Scripts" dialog.  By choosing "Server" I can see which ones I'll have trouble with and consider either work-arounds or keeping my robots.  Overall I'm really happy with this new functionality.

            • 3. Re: Server 10: Running Automated System Scripts (Windows Batch Files)
              philmodjunk
                

              Is there somemwhere I can configure this folder location like I can for my databases and backups?

              Not as far as I know.

               

              Glad your server scripts are working. Import records fails miserably in server side script except for a few very limited scenarios. The "compatibility" option is thus misleading as it shows this step to be compatible, when in fact it is not for most uses of this tool.

               

              Quoting from Knowledge Base Article 7035:

               

            • Any specified file must in the Documents folder, the temporary folder, or a child folder of either the Documents folder or the temporary folder. For example, the following are all valid paths for file.csv:

              <Documents>/file.csv
              <Temporary Path>/file.csv
              <Documents>/Folder1/file.csv
              <Temporary Path>/Folder1/Folder2/Folder3/Folder4/file.csv

            • Any path specified that isn't a complete path to the file (for example, anything other than/Library/FileMaker Server/Data/Documents/<0 or more directories>/<filename> ) is evaluated as being relative to the temporary path.
            • Any paths that include ".." are considered invalid.