2 Replies Latest reply on Jun 24, 2010 11:48 AM by laneystewart

    exporting file with scheduled server script

    laneystewart

      Title

      exporting file with scheduled server script

      Post

      I am trying to run a FM script thru the server schedule.  I can successfully launch the script from the client to save a .xls file to a location with a set variable for the file name, but when it goes thru the server schedule I get a error (800) that says that it can not save the file.  All script steps are server compatable.

       

       I am on a MAC client so when I launch the script names the file path with a "filemac:/........", but the server is a windows machine so i have changed the server to assign the file name as "filewin://......." and get the error.  I have tried just "file:" but it still fails!!!  Any idea of why this is?????  As well, does anyone know why Filemaker will no longer over write an existing file with a new one with the same name?  It used to and no longer does, so I have had to make the variable also set an incrementing number for the files that I am saving.... :smileymad:UGH... Here is my code:

       

      Go to Layout [ Opening layout]

      Sort records [Restore, No dialog]

      Set Variable [$filename: Value:"filewin://its-fp3/Cas_data_2/OnBase/"& Substitute ( Events::record ID; " " ; "-" ) & "tc.xls"

      Set Error Capture [On]

      Export Records [No Dialog; "$filename; Unicode (UTF-16)]

      Set Error Capture [Off]

      Send Mail [Send via SMTP Server; No Dialog; to: BLAH BLAH BLAH]  This set works fine.......

       

      ANY help would be great!!!!!  This is one small step in getting a solution to one of my other posts cleared (sending report thru email in IWP)