If you connect to the database as a client and run a script to export the records from the client session, it should work for you.
If you are attempting to use the Server's Scheduler to schedule the script to run from the server, then you will have many problems and probably will not be able to get this to work to your satisfaction.
Both Import and Export scripts are nearly non-functional when run as a server scheduled script. There's a knowledge base article that you can search for on this if you need to know more.
I am connecting to the database as a client. I know about the restriction for exports, limiting them to the Documents or Temp directories.
I have even tried
"filewin:" & Get(DocumentsPath) & "temp.tab" as mentioned in a Filemaker article
And the file will not write. My script debugger gives me Error 3, which means: Command is unavailable (for example, wrong operating system, wrong mode, etc.)
I just did the following test:
I opened a file that I am hosting from FMS 10 with a full access password.
I created a one line script:
Export Records[No Dialog; "newtabfile"; Windows (ANSI)]
I clicked the first specify... button and selected "Add file" to select a file on my desk top. I then changed the file name in the file reference from the existing file to "newtabfile".
I click the second specify button and selected a pair of fields for export.
I saved the script.
I then performed the script from the script manager window and it successfully exported the current found set to my desk top.
How does that differ from what you are trying to do?
It differs in the fact that I am using external authentication. When I open my main database using the Shift key and an Admin account, I didn't realize that all related databases are NOT accessed with Admin privilieges; they are accessed with the normal external authentication privileges. And for some reason, the external authentication group I used for my line item database did not have Export enabled.
Well, good to know.
/embarassed, but wiser