-- This AppleScript was developed based on the examples provided by -- Panic, with the help of several Panic team members, and -- from sample code from Apple and several -- posters on macosxhints.com -- this is the volume name of your disk image which will serve as your -- local idisk copy property diskname : "iDisk" -- This is the path to your disk image property diskpath : "Macintosh HD:Users:shortname:iDisk.dmg" -- this section makes sure the disk image is mounted so Transmit -- can sync to/from it -- Credit for this code to various posters on macosxhints.com tell application "Finder" if not (exists the disk diskname) then do shell script ("hdiutil attach " & quoted form of  POSIX path of (diskpath as string) & " -mount required") repeat until name of every disk contains diskname delay 1 end repeat end if delay 5 end tell tell application "Transmit" -- you need this so Transmit does not stop and display dialogs -- it allows unattended sync set SuppressAppleScriptAlerts to true -- logging is optional my writeLog("About to sync iDisk") -- Create a new session window for the script make new document at before front document -- send commands to the frontmost document window tell current session of document 1 -- here you can also specify a connection, but then you have to -- hardcode your password in the script if (connect to favorite with name "iDisk") then --Sync "Backup" folder if (set your stuff to "/Volumes/iDisk/Backup/") then if (set their stuff to "/iDiskusername/Backup") then synchronize method update direction upload files with time offset 0 synchronize method update direction download files with time offset 0 else my writeLog("An error occured, could not change remote folder to Backup") end if else my writeLog("An error occured, could not change local folder to Backup") end if --Sync "Documents" folder if (set your stuff to "/Volumes/iDisk/Documents/") then if (set their stuff to "/iDiskusername/Documents") then synchronize method update direction upload files with time offset 0 synchronize method update direction download files with time offset 0 else my writeLog("An error occured, could not change remote folder to Documents") end if else my writeLog("An error occured, could not change local folder to Documents") end if --Sync "Movies" folder if (set your stuff to "/Volumes/iDisk/Movies/") then if (set their stuff to "/iDiskusername/Movies") then synchronize method update direction upload files with time offset 0 synchronize method update direction download files with time offset 0 else my writeLog("An error occured, could not change remote folder to Movies") end if else my writeLog("An error occured, could not change local folder to Movies") end if --Sync "Music" folder if (set your stuff to "/Volumes/iDisk/Music/") then if (set their stuff to "/iDiskusername/Music") then synchronize method update direction upload files with time offset 0 synchronize method update direction download files with time offset 0 else my writeLog("An error occured, could not change remote folder to Music") end if else my writeLog("An error occured, could not change local folder to Music") end if --Sync "Pictures" folder if (set your stuff to "/Volumes/iDisk/Pictures/") then if (set their stuff to "/iDiskusername/Pictures") then synchronize method update direction upload files with time offset 0 synchronize method update direction download files with time offset 0 else my writeLog("An error occured, could not change remote folder to Pictures") end if else my writeLog("An error occured, could not change local folder to Pictures") end if --Sync "Public" folder if (set your stuff to "/Volumes/iDisk/Public/") then if (set their stuff to "/iDiskusername/Public") then synchronize method update direction upload files with time offset 0 synchronize method update direction download files with time offset 0 else my writeLog("An error occured, could not change remote folder to Public") end if else my writeLog("An error occured, could not change local folder to Public") end if --Sync "Sites" folder if (set your stuff to "/Volumes/iDisk/Sites/") then if (set their stuff to "/jwein iDiskusername berger/Sites") then synchronize method update direction upload files with time offset 0 synchronize method update direction download files with time offset 0 else my writeLog("An error occured, could not change remote folder to Sites") end if else my writeLog("An error occured, could not change local folder to Sites") end if end if end tell disconnect close front window quit my writeLog("iDisk sync done") end tell on writeLog(themessage) --this code credit to macosxhints posters and others set theLine to (do shell script  "date +'%Y-%m-%d %H:%M:%S'" as string)  & ": " & themessage do shell script "echo " & theLine &  " >> /Some/Path/To/A/logfile.txt" end writeLog