how to copy a folder from preferences under lion?

Tiemo Hollmann TB toolbook at
Wed Aug 10 07:11:40 EDT 2011


My software had a folder and files in /library/Preferences/ where now under
Lion the user has no permissions any more

I want to build a migration tool for my customers to move the folder and
files from /library/Preferences/ to the new location at

I tried: get shell("sudo mv" oldPathAndFolder newPathAndFolder) and same
with ditto. Executing this command just nothing happens, the result returns

I tried it with AppleScript:

Tell "Finder"

do shell script "mv /oldPath/AndFolder/ /newPath/AndFolder/"

end tell

it returns an execution error, when trying to copy from preferences. Copying
from user folders runs fine.

Trying: do shell script "mv /oldPath/AndFolder/ /newPath/AndFolder/ with
administrator rights" returns a compiler error


Why can I move my folder from preferences with the terminal using "sudo mv",
but not from within LC? What am I doing wrong? Or is Jans proposal to build
a separate executable and elevate the rights the only way to get
permissions? (no idea yet how to do that, therefore not tested it yet)

Thanks for any help





More information about the Use-livecode mailing list