View Full Version : syncronization with Applescript?
04-26-2003, 02:28 AM
Hey everyone. I have the need for an applescript to sync two folders. one on my powerbook, and one on my ibook. The ibook's documents folder will sync to a folder called "ibook" which resides on in the powerbooks documents folder. Anyone have ideas on how this script should go code wise. I am new to applescript and have not written anything this complicated. Basically all it should do is copy and update only the files necessary and remove and files on the destination that are no longer on the source. thanks for the help.
I think the easiest way to do this would be to use a combination of something like PsyncX (http://www.versiontracker.com/dyn/moreinfo/macosx/16089) and embed a shell command within your applescript as follows:
tell application "Finder"
do shell script "/usr/local/bin/runpsync -d 0 0 '/Volumes/mayhem/Installers etc' '/Volumes/archive/Installers etc'"
The above assumes there are no permission issues.
05-02-2003, 07:16 PM
I'm trying to do the same thing and can't figure out psync. I basically just want to copy a file from one mac to another. I'm trying variations of this and always get a n error:
tell application "Finder" to duplicate folder ¬
"Macintosh HD:Users:Dan:Documents:Files to Copy" to ¬
"Volume2:Users:Dan:Desktop:temp" with replacing
Using psync is easy if you use a combination of PsyncX (http://www.versiontracker.com/dyn/moreinfo/macosx/16089) (which is a gui to psync) and CronniX (http://www.versiontracker.com/dyn/moreinfo/macosx/9478) (which allows you to edit your crontab). PsyncX will allow you to set a scheduled task and CronniX allows you to view the set task which you can then copy into an applescript (see my post above for the syntax). Hope that helps.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.