You cannot write to any folders that the filemaker service does not have access ti which is generally only things in the FMS's Documents folder, Temp Folder or Desktop (not your desktop, the services' desktop). C:test.... whatever is something you created for your user and it is doubtful the FM service can write to it. In Windows, you should be writing to something like /C:/Program Files/FileMaker/FileMaker Server/Data/Documents Everything from Data and below is generally available to the server and nothing else on the hard drive.
Taylor thanks for the info, the script works now.
Your path is not available to FMS. Because it does not rely on any user being logged in FMS uses a its own account. For security FMS cannot access ing location outside of its own folder structure. To read and write files use the Documents Path.
Get ( SystemPlatform ) = "-2" ;
& Get ( DocumentsPath )