Jump to content

  •  

Photo

server side image export and create folders


  • Please log in to reply
5 replies to this topic

#1 Jonas Löfvenmark  member

Jonas Löfvenmark
  • Members
  • 21 posts
  • FM Application:12 Advance
  • Platform:Mac OS X Leopard
  • Skill Level:Intermediate
  • Time Online: 10h 26m 24s

Posted 31 December 2011 - 07:03 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.

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!
  • 0

#2 bcooney  consultant

bcooney
  • Moderators
  • 5,731 posts
  • LocationLong Island, NY
  • FM Application:13 Advance
  • FMGo:iPad
  • Platform:Cross Platform
  • Skill Level:Expert
  • Certification:9, 10, 11, 12
  • Membership:TechNet
  • Time Online: 23d 11m 52s

Posted 31 December 2011 - 07:31 AM

Take a look at SuperContainer.
  • 1

#3 Steven H. Blackwell  Humble Servant

Steven H. Blackwell
  • Moderators
  • 4,736 posts
  • FM Application:13 Advance
  • Platform:Cross Platform
  • Skill Level:Expert
  • Certification:7, 8, 9, 10, 11, 12
  • Membership:FileMaker Business Alliance, FIleMaker Platinum Member
  • Time Online: 8d 22h 1m 39s

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
  • 1

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
_ _ ____________________________ _ _
http://www.fmp-power.com
http://www.filemakersecurity.com


#4 Wim Decorte  Carpal Tunnel

Wim Decorte
  • Moderators
  • 3,465 posts
  • LocationToronto
  • FM Application:13 Advance
  • FMGo:iPhone / iPod Touch, iPad
  • Platform:Cross Platform
  • Skill Level:Expert
  • Certification:7, 8, 9, 10, 11, 12, 13
  • Membership:TechNet
  • Time Online: 29d 5h 11m 21s

Posted 01 January 2012 - 02:30 PM

A couple of issues here I think:
- 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.
  • 1

#5 bcooney  consultant

bcooney
  • Moderators
  • 5,731 posts
  • LocationLong Island, NY
  • FM Application:13 Advance
  • FMGo:iPad
  • Platform:Cross Platform
  • Skill Level:Expert
  • Certification:9, 10, 11, 12
  • Membership:TechNet
  • Time Online: 23d 11m 52s

Posted 02 January 2012 - 05:40 AM

You might find this thread interesting (using ScriptMaster).
  • 1

#6 Jonas Löfvenmark  member

Jonas Löfvenmark
  • Members
  • 21 posts
  • FM Application:12 Advance
  • Platform:Mac OS X Leopard
  • Skill Level:Intermediate
  • Time Online: 10h 26m 24s

Posted 02 January 2012 - 09:46 AM

Thank you all for all your input!

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.
  • 0




FMForum Advertisers