• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
(no subject)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(no subject)


  • Subject: (no subject)
  • From: Peter Baxter <email@hidden>
  • Date: Wed, 8 Nov 2006 02:42:02 +1100

I am writing an applescript to synchronise two folders, one local and one on a network.  Each folder should have the same data, one is local (on a MacBook Pro) and the other on a windows network.

I have this script which works, but does not identify the most recent file:

property local_foldername : "~home/Documents"
property destination_foldername : "smb://some/ networked/location"
property eject_when_done : true
property confirm_backup : true
on clicked theObject
tell application "Finder"
if not (exists folder "Backups" of home) then
make new folder at home with properties {name:"Backups"}
end if
set source_folder to folder local_foldername of home
set the alias_list to every alias file of the source_folder
if (count alias_list) > 0 then
try
duplicate every file of local_foldername to destination_foldername with replacing
duplicate every file of destination_foldername to local_foldername with replacing
end try
end if
end tell
end clicked

If I run this only from the mac, any work done on a PC desktop which writes to the destination_foldername will be overwritten by files from the local_foldername.  Unlike my backup scripts which only have changes to the original file, these files will be changed in both locations.   I need to identify and replace only files that are older than the source files.  Is this possible?




Peter Baxter
email@hidden


iChat email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: Quark non-breaking spaces
  • Next by Date: Re: Quark non-breaking spaces
  • Previous by thread: Re: Custom spam filter
  • Next by thread: (no subject)
  • Index(es):
    • Date
    • Thread