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

Similar Threads
thread Thread Starter Forum Replies Last Post
Copy files to folder using Applescript Kitkat88 Mac Programming 7 Jun 23, 2014 07:45 AM
Stop folder copy but keep already copied files? pipkato OS X 10.8 Mountain Lion 0 May 26, 2013 02:49 PM
Is it possible for people on the "network" to read the files in the Shared folder ? XPcentric Mac Basics and Help 1 Jan 25, 2013 02:23 PM
iTunes Match Files or copy Itunes Music Folder nortyhat OS X 10.8 Mountain Lion 0 Jul 26, 2012 02:56 PM
How to copy files with the same name into one folder? li3to OS X 3 Jul 6, 2012 12:34 PM

Forum Jump

All times are GMT -5. The time now is 09:17 PM.

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

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