Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 2, 2012, 04:14 AM   #1
1theo0
macrumors member
 
Join Date: Jul 2012
Copy files from read-only folder without password

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:
Quote:
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!
__________________
MacBook White 4,1 2010 model

Last edited by 1theo0; Nov 2, 2012 at 04:19 AM.
1theo0 is offline   0 Reply With Quote
Old Nov 2, 2012, 09:01 AM   #2
kryten2
macrumors 6502a
 
Join Date: Mar 2012
Location: 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
__________________
Space Corps Directive 34124
kryten2 is offline   1 Reply With Quote
Old Nov 3, 2012, 05:37 AM   #3
1theo0
Thread Starter
macrumors member
 
Join Date: Jul 2012
Quote:
Originally Posted by kryten2 View Post
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!!!
__________________
MacBook White 4,1 2010 model
1theo0 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:44 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC