1. on find by stringForName
  2. set savedDelimiters to AppleScript's text item delimiters
  3. set AppleScript's text item delimiters to return
  4. set theResult to text items of (do shell script "fname=\"$(basename " & quoted form of stringForName & ")\";mdfind 'kMDItemDisplayName == \"'\"$fname\"'\"' | sort")
  5. set AppleScript's text item delimiters to savedDelimiters
  6. return theResult
  7. end find
  8. on optimize for paths
  9. set destinationPaths to {}
  10. set holdDestinationPaths to {}
  11. set newestFile to missing value
  12. repeat with thePath in paths
  13. try
  14. tell application "Finder" to set modificationDate to modification date of file (me's POSIX file thePath)
  15. if newestFile is not missing value and modificationDate < date of newestFile then
  16. set holdDestinationPaths to holdDestinationPaths & {thePath}
  17. else
  18. if newestFile is not missing value then
  19. set destinationPaths to destinationPaths & {filePath of newestFile} & holdDestinationPaths
  20. set holdDestinationPaths to {}
  21. end if
  22. set newestFile to {filePath:thePath, date:modificationDate}
  23. end if
  24. end try
  25. end repeat
  26. return {source:filePath of newestFile, destinations:(destinationPaths & holdDestinationPaths)}
  27. end optimize
  28. on synchronize by keyFilePath
  29. set copyPath to optimize for (find by keyFilePath)
  30. if (count of destinations of copyPath) is 0 then return
  31. set destinations of copyPath to choose from list destinations of copyPath OK button name "Copy" with title "Update the same files" with prompt "Copy “" & source of copyPath & "” to:" with multiple selections allowed
  32. if (count of destinations of copyPath) is 0 then return
  33. tell application "Finder"
  34. set sourceObject to file (me's POSIX file (source of copyPath))
  35. set destinaationObjects to {}
  36. set destinationContainers to {}
  37. repeat with thePath in destinations of copyPath
  38. set destinaationObject to file (me's POSIX file thePath)
  39. set destinaationObjects to destinaationObjects & {destinaationObject}
  40. set destinationContainers to destinationContainers & {container of destinaationObject}
  41. end repeat
  42. try
  43. delete destinaationObjects
  44. on error message
  45. display dialog message
  46. end try
  47. repeat with theContainer in destinationContainers
  48. try
  49. duplicate sourceObject to theContainer
  50. on error message
  51. display dialog message
  52. end try
  53. end repeat
  54. end tell
  55. end synchronize
  56. on open droppedItems
  57. if (count of droppedItems) is 0 then return
  58. synchronize by POSIX path of item 1 of droppedItems
  59. end open
  60. -- for example
  61. synchronize by "hoge.txt"
  62. synchronize by "../../Hoge/Desktop/hoge.txt"
  63. synchronize by "/Users/Hoge/Desktop/hoge.txt"

Sample