Problems with the Copy command and folders.

I am having trouble with setting a copy to overwrite folders in a script.

I have tried “while replacing” but got an error, stating that it couldn’t be used after an alias…

	copy (alias MobiFolder) to (alias newpath)

What would I use to have this copy a folder to another location, possibly replacing something already there with the same name?

Maybe this will work.

tell application "Finder"
		duplicate alias MobiFolder to alias newpath with replacing
	on error e number num
		display dialog e & return & num
	end try
end tell

– Rob