1 2 Previous Next 20 Replies Latest reply on Apr 2, 2013 3:27 PM by BowdenData

    Server Side Script Export, Error 800


      I have a script that has been in use for about a year that i would manually run everyday to export information out of the database to be posted to our website.


      Since i'm finally getting around to re-writing the database i figured i would make this a server side script so it would be one less thing i would have to do. The script is hanging up on one step which is exporting the data to a file. It returns an error 800 which is Unable to create file on disk.


      On the server (Windows Server 2008, FMSA 12) I have a mapped drive setup so i can export exactly where i want it which is Y:eclcheckskrames.txt.


      I figured that this error was being cause by it not being a local drive so on the c: drive i created a folder called exports and changed the script to export to c:exportskrames.txt. I figured i could always use robocopy to get it where i need after the fact. FileMaker does not like this path either, get error 800 on this path as well.


      At this point i'm at a loss. Anybody have any insight as to why it cant create an export?

        • 1. Re: Server Side Script Export, Error 800

          Its simple, FMS can only write to its own Folder system. Use the FMS Documents Folder and move it from there.


          FMI Knowledge base # 7035


          • 2. Re: Server Side Script Export, Error 800

            Just as an update. if i set a variable prior to exporting called $path and give it a value of Get ( DocumentsPath ) & "krames.txt", it will export the file to C:\Program Files\FileMaker\FileMaker Server\Data\Documents


            Is this the only option when it comes to exporting from server?

            • 3. Re: Server Side Script Export, Error 800

              Saw your post right after i tested it. Was not aware of this since this is the first time i've tried exporting from a server side script. I guess i will just move it from there. Thanks

              • 4. Re: Server Side Script Export, Error 800

                Hi Matt,


                There's only 2 folders you can export to when running server side scripts. They are mentioned in the Knowledge Base article referred to previously:


                "Any specified file must be 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:


                <Temporary Path>/file.csv


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


                So it's either the Documents folder of the Temp folder.





                FileMaker 12/11/10/9/8 Certified Developer


                - - - - - - - - - - - - - - - - -

                Phone: +61 2 9484 6565

                Mobile: +61 418 468 103

                Email: andrew@databuzz.com.au


                • 5. Re: Server Side Script Export, Error 800

                  You can use a plugin to then move the document from the Documents or Temporary folder to whatever location you want as long as you have the permissions set correctly.  I personally use 360Works ScriptMaster and Monkey Bread Software plugins to do tasks like this.  But there are several others that do this too.  Remember that that plugin has to work on and in installed in the server's extension folder. 

                  • 6. Re: Server Side Script Export, Error 800

                    I already have scriptmaster so i may play around with that tomorrow. Would be wonderful if FileMaker Server tasks had the ability to run pre and post commands.

                    • 7. Re: Server Side Script Export, Error 800



                      You can run before and after OS level scripts. Not sure when this came in, but it is in 11 and 12. When you create the server task, select Script, then select Sequence. Note that the before and after scripts are OS level, so on Windows it could be a batch/command file (.bat or .cmd), or VBScript (.vbs). Can likely run a powershell script since you are on Win2008.


                      The scripts have to live in the special scripts folder that is inside the Data folder. This is at the same level as the server documents folder referenced in the above threads.





                      • 8. Re: Server Side Script Export, Error 800

                        I know i can do that but i would have to setup another schedule to run right after the export schedule.


                        What i was referring to is when you schedule a task, have it give you the option to run a command prior to the task and after. Basically all in one schedule.

                        • 9. Re: Server Side Script Export, Error 800

                          If you want to use a FileMaker plugin, it is just a script step that you put at the end of the script.  You don't have to schedule another task such as an OS level batch file.  

                          • 10. Re: Server Side Script Export, Error 800

                            Yeah i got that, i was just commenting on BowdenData's comment that this is how i currently have to do it. I'll dig into scriptmaster tomorrow and see what i can come up with.

                            • 11. Re: Server Side Script Export, Error 800



                              No - a script SEQUENCE schedule does exactly this. See the script before and script after in the attached screenshot. I am only using a before script in this example.


                              What this means is that when it executes, it will run the before .vbs script and if that script runs successfully, it will then run the FM script SYS_01_import. If I had an after script, it would run after the FM script completed.




                              Screen shot 2013-04-01.png

                              • 12. Re: Server Side Script Export, Error 800

                                Was not aware of that, i will look into it today. Sorry for the confusion.

                                • 13. Re: Server Side Script Export, Error 800

                                  So i setup a Script Sequence and i am running into a new error.


                                  I created a bat file with the following string:

                                  ROBOCOPY "C:\Program Files\FileMaker\FileMaker Server\Data\Documents" Y:\eclchecks


                                  If i run the bat file manually, everything works great and the file is copied to the correct location. When FileMaker Server executes the same bat file, it returns an error:


                                  Error 692

                                  Schedule "Hourly Exports" aborted, system script "Move2FTP.bat" returned a non-zero status 16.


                                  The script has been setup to run with the same user account that i am logged in with when i run it manually so i do not believe it is a permissions issue.


                                  Did a search online for error 692 but did not come up with a whole lot of information.

                                  • 14. Re: Server Side Script Export, Error 800

                                    Try putting the full path to the robocopy executable in the batch file. In theory, if the path to the robocopy.exe is in your environment variables, you should not have to do this, but...


                                    In my example screen, the .vbs script that I am executing is also using robocopy, but I define the full path to it in the script.


                                    Good on specifying the account to run the script under and that account works when logged in manually.


                                    As for error checking, I think you need to look at code "16" as this is what the batch file is returning. Try doing a google/bing search for this and see what you find.



                                    1 2 Previous Next