This looks right

I’m trying to copy a folder off a hard drive to a folder on my desktop. The folder im trying to copy included subfolders with multiple files in each. I thought what was below was right, but I get the following error:

(Keep in mind myHD is a predefined variable)

tell application "Finder"
	set sourceFolder to ("Volumes:" & myHD & ":my_stuff:Music:") 
	set destinationFolder to ((path to desktop folder as text) & "My Music:") 
	duplicate entire contents of folder sourceFolder to folder destinationFolder replacing yes
end tell

AppleScript Error

Finder got an error: Can’t set folder “Macintosh HD:Users:JJ:Desktop:Ipod Music:” to entire contents of folder “Volumes:myHD:my_stuff:Music:”.

That’s maybe because the HSF path doesn’t start with volumes. Try this:

(myHD & ":subfolder:") as alias
POSIX file ("/volumes/" & myHD & "/subfolder/") as alias

Hope it works,


easier and probably faster

do shell script "/usr/bin/ditto '/Volumes/" & myHD & "/my_stuff/Music' ~/Desktop/My\\ Music"