OK, I dug up one of my old sync scripts, I had different approach to sync. I mod it to your liking,
make back up of your data, before test out the scripts:
on adding folder items to volumes_folder after receiving added_items
set mac_folder to "path:to:Mac:folder" -- in text
set USB_folder to "path:to:USB:folder" -- in text
set Mac
folderitems to list folder alias mac_folder without invisibles
set USB
folderitems to list folder alias USB_folder without invisibles
set same_pile to {}
tell application "Finder"
-- if not exist copy USB-->Mac, and build same files pile
repeat with USB_item in USB
folderitems
if Mac
folderitems does not contain USB_item then
copy item USB_item of folder USB_folder to folder mac_folder
else if Mac
folderitems contains USB_item then
copy USB_item to end of same_pile
end if
end repeat
-- if not exist copy Mac-->USB
repeat with Mac_item in Mac
folderitems
if USB
folderitems does not contain Mac_item then
copy item Mac_item of folder mac_folder to folder USB_folder
end if
end repeat
-- copy same pile file from Mac-->USB or USB-->Mac, base on mod date.
repeat with same_item in same_pile
set USB
item_moddate to modification date of item same_item of folder USB_folder
set mac
item_moddate to modification date of item same_item of folder mac_folder
if USB
item_moddate is greater than mac
item_moddate then
duplicate item same_item of folder USB_folder to folder mac_folder with replacing
else if mac
item_moddate is greater than USB
item_moddate then
duplicate item same_item of folder mac_folder to folder USB_folder with replacing
end if
end repeat
end tell
end adding folder items to
OK, save the script in 'Folder Action Scripts' folder, then attach it to
Volumes folder.
Volumes folder is where disk drives are mounted, so when you connect you USB drive to your Mac. It shows up in Volumes folder, that will trigger the script.
Also, it would be nice the if USB drive was already attached, and I added a new file to either folder, it would update automatically
That requires a different script:
on adding folder items to this_folder after receiving added_items
tell application "Finder"
set mac_folder to folder "path:to:Mac:folder" -- in text
repeat with _item in added_items
duplicate _item to mac_folder with replacing
end repeat
end tell
end adding folder items to
attach it to your USB folder.