System Level Script 'Aborts Unexpectedly' Windows Server 2012 FMS13
I'm on a Windows 2012 Server running FMS13.
I have written a simple .bat file which simply copies a .csv file from /data/documents/ to a server share.
Running the .bat in CMD prompt or Powershell successfully copies the file.
I've tried to set up a script schedule in FMS13.
I can see the .bat file in the drop down menu in step 1.
I have also added an admin user account to run the script by.
The event log gives me this error:
Schedule "Batch Script" aborted; "ProcessCSVfiles.bat" could not be found or is invalid
I don't think this is a very helpful nor a true description.
1) The file does exists and has already be found.
2) It is not invalid as it runs correctly from the cmd prompt
I imagine it is a permissions issue? But I am completely stumped having given the file itself full control to the all 'Users' account as well as fixed permissions on all the folders the batch script refers to, it can't get any more relaxed than that and I'm running it as a Windows 2012 server admin account.
The .bat file simply says this:
SET inbox=C:\Program Files\FileMaker\FileMaker Server\Data\Documents\inbox
SET sent=C:\Program Files\FileMaker\FileMaker Server\Data\Documents\sent
FOR /F "delims=|" %%I IN ('DIR "%inbox%\*.csv" /B /O:D') DO COPY "%inbox%\%%I" "%PSFPath%" & MOVE "%inbox%\%%I" "%sent%\" & EXIT
I'd really appreciate any insight anyone can offer
Thanks so much