Im working on a script that renames a file, then copies it to a directory, However i get perm denied - I have added code below. Any help would be really appreciated. Cheers
// Renames File
tell application "Finder"
set theFile to (desktop as text) & "New.jpg" as alias
set name of theFile to "DefaultDesktop.jpg"
// Tries to copy to destination
do shell script "cp -r /$HOME/Desktop/DefaultDesktop.jpg /System/Library/CoreServices/"
This is what i get in Results Section
error "cp: /System/Library/CoreServices/DefaultDesktop.jpg: Permission denied" number 1