how to copy a folder from preferences under lion?

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


Hello,

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
/Applications/myFolder/.

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

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

Tiemo

 

 

 




More information about the use-livecode mailing list