Sync folders

Hi,

I have some pdf files in a folder (local). I have to copy them to two servers. Every week I do it manually. Now I am wondering if it is possible to do this using an applescript.

Does anyone has experience with this?

thanks



tell application "Finder"
	open location "afp://user:password@server/share" -- this is the remote location1
	open location "afp://user:password@server/share" -- this is the remote location1

set startFolder to "Macintosh HD:Users:user:Desktop:" -- your starting folder
set destinationFdrPosix1 to  "Volumes:ServerName:ShareMountName:Folder" -- your dest. folder 1
set destinationFdrPosix2 to  "Volumes:ServerName:ShareMountName:Folder" -- your dest. folder 2 

-- Once the folder is mounted, you can go to the Volumes folder on the root of the computer to see the exact path for the destinations. 

  copy contents of startFolder to folder destinationFdrPosix1
  copy contents of startFolder to folder destinationFdrPosix2
end tell

OR, if “copy contents” doesn’t work, you can replace the last section with



tell application "Finder"
  duplicate files of startFolder to folder destinationFdrPosix1
 duplicate files of startFolder to folder destinationFdrPosix2

end tell