Copy files from read-only folder without password

Discussion in 'Mac Programming' started by 1theo0, Nov 2, 2012.

  1. 1theo0, Nov 2, 2012
    Last edited: Nov 2, 2012

    macrumors newbie

    1theo0

    Joined:
    Jul 21, 2012
    #1
    Please help! I want my applescript to copy files from the system folder and place them inside the script bundle... In Finder, you don't need the password to copy files from read-only folders...

    from
    /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/Resources/ArtFile.bin
    to
    Contents:Resources:

    this doesn't work:
    It gives me an "illegal option" error..
    Please help me... Thank you!
     
  2. macrumors 6502a

    Joined:
    Mar 17, 2012
    Location:
    Belgium
    #2
    Try this :

    Code:
    set theBackup to (path to me as string) & "Contents:Resources:"
    set ArtFile to "/System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/Resources/ArtFile.bin"
    do shell script "cp " & quoted form of POSIX path of ArtFile & space & quoted form of POSIX path of theBackup
     
  3. thread starter macrumors newbie

    1theo0

    Joined:
    Jul 21, 2012
    #3
    Thank you!!!
     

Share This Page