Mac OSX merge solution
I, like _MANY_ other mac users (ex-windows users or not) am baffled that such a full featured OS as OS X could possibly not have the easy ability to merge folders, when you drag one folder into another folder that contains a folder of the same name…
Anyway, just cuz i am baffled, mystified, annoyed etc… my emotions don’t magically create OS updates that solve my problem.
So i got into some applescript. It may not be elegant, but it does something potentially useful to some of you.
It is designed to be used in an Automator workflow in a Run Applescript action box, which is directly connected to a Move to Trash action box. In finder two windows much be open, just as it should be if we were allowed to CONTROL-SHIFT drag the folders over.
There is a confirmation of the destination directory (”window 2″ which is the back window) {beware of the expandable panes and list views, this script takes the target of the window - NOT the selection}
I initiate the script by finding the destination in one finder window, then switching to the source folder and selecting and right clicking (multiple selection is fine) the folders i want to merge into the destination folder. {remember it takes the contents of the source folders}
global the_output
on run {input, parameters}
set the_output to ""
tell application "Finder"
set tgtWin to window 2
set tgtpath to (quoted form of POSIX path of (target of tgtWin as alias))
end tell
display dialog "tgt: " & tgtpath
repeat with i in input
set srcpath to (quoted form of POSIX path of (i as alias))
do shell script "rsync -au --stats " & srcpath & " " & tgtpath & " | grep 'files:'"
set the_output to the the_output & result & "\n"
end repeat
display dialog the_output & " delete src?"
return input
end run




[…] Script: http://gotblogua.gotjosh.net/11-2007/171_mac-osx-merge-solution/(habe ich selbst nicht versucht) […]
Pingback by Fehlerfalle joomla Update unter MacOsX | bloghouse.org — April 7, 2008 @ 20:14 / 8:14 pm