server side image export and create folders
Posted 31 December 2011 - 07:03 AM
Enviroment is Windows Server 2008, and FMSE 11, also I have the mooplug and CNSImage plug-ins installed. As I am a OS X dude myself I am in desperate help of anyone with windows folder mapping or FMSE experience of this or similar situation. Thanks!
Posted 31 December 2011 - 07:31 AM
Posted 01 January 2012 - 04:40 AM
I need to set up a server scheduled script to export a bunch of images, to a different drive than the filemaker server installation. Also I need to be able to create folders at this location. I have tried creating a shortcut in the data/documents folder and used get(DocumentsPath) & "myfolder" but this does not work. Also tried using "myfolder.lnk" with the same result.
FileMaker Server must have permissions to read and write (at a minimum) to the target location. FMS runs under Local Service. be sure the permissions are correct.
Steven H. Blackwell
Platinum Member Emeritus, FileMaker Business Alliance
Platinum Member, FileMaker Business Alliance (2007-2011)
Partner Member, FileMaker Solutions Alliance (1998-2007)
Partner Member, Claris Solutions Alliance (1997)
FileMaker Certified Developer 7|8|9|10|11|12
FileMaker Authorized Trainer 9|10|11|12
_ _ ____________________________ _ _
Posted 01 January 2012 - 02:30 PM
- it's better to export locally and then use OS level features to copy the exports to a mapped drive. FMS by default runs as "local system" under Windows and that does not have any rights to network resources like shares.
- a FMS script sequence schedule can take care of this because you can specify an account with rights to the network share to move the files there. Note that you'll need to use the UNC syntax of the share and not use a mapped drive since this will run in "non-user" space. The UNC syntax will look something like this: \\serverName\shareName
- I'm pretty sure that you can not use a FMS server-side script to export from a container field. But I could be wrong here. Check the server-compatible script steps to verify this. If it can't you'll need either SuperContainer or use a robot client machine.
Posted 02 January 2012 - 09:46 AM
I have this working for one hosted file, but strangely enough not for the other; by setting the filemaker service to "allow desktop access" I can export to a server side local drive by using the CNSImage_Export function on a variable. Exactly what I wanted! Why this only works for one of the files is a mystery. Both file's script run fine from the client, but only one of them from the server. Both files have the same user with full access, and both scripts are run with full user access.
Next I will look into importing images from a network share, and I found out by trail and error that it does not work (@Wim Decorte: thanks for confirming), and will have to look at the ScriptMaster thread (@bcooney: thanks for the tip)!
I did try to set up a different user with full access for the FM service, but then I could not log on to the filemaker server. Any input on that is greatly appreciated.