Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

1theo0

macrumors member
Original poster
Jul 21, 2012
32
0
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:
set Backup to (path to me as string) & "Contents:Resources:"
set ArtFile to (path to me as string) & "/System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/Resources/ArtFile.bin"
do shell script "cp -R" & quoted form of POSIX path of ArtFile & space & Backup
It gives me an "illegal option" error..
Please help me... Thank you!
 
Last edited:

kryten2

macrumors 65816
Mar 17, 2012
1,114
99
Belgium
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
 

1theo0

macrumors member
Original poster
Jul 21, 2012
32
0
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

Thank you!!!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.