1
1
Using and Automator Service and an AppleScript that is redly available and exists on this thread of but a "GUI" around ditto. The solution works well, however, I am not getting the behavior I expected. Ditto, without modification, copies a folder to a dest folder and creates the folder if it doesn't exist. The behavior I get with the service is the contents are copied into the destination. Can someone give me a hand in getting the applescript modified to that the folder is copied to the destination not the contents into the destination? Script follows:
on run {input, parameters}
set dest to choose folder with prompt "select destination:"
set dest_path to (POSIX path of dest) as text
set src_paths to ""
repeat with idx from 1 to count (input)
set src_paths to src_paths & (quoted form of (POSIX path of item idx of input as text)) & " "
end repeat
set cmd to "ditto " & src_paths & quoted form of dest_path
do shell script cmd
end run
Anyone have any ideas? – Craig Lindsey – 2015-06-08T13:30:07.280