This is my first post so hi!
I have an os x server that we are multicasting image replication using Netrestore and Carbon Copy Cloner. I’m writing a script to automate the process a little.
The process goes like this: Carbon Copy Cloner images a machine via firewire and saves the image to the iDrive (second drive). The resulting file is named whatever the target machines hard drive was and asr.dmg ie: Macintosh HD_asr.dmg. The resulting file always has read only properties.
My script gathers the new name for an image and attempts to rename the file. The script will do a lot more than that but I’m stuck at the renaming. I’ve spent four days trying to figure out how to change the files permissions.
Here is my code:
on retreiveimage() -- script to load image name and place values into new property set thePath to (path to preferences as string) & "prw_prefs.scpt" -- set's thePath for saving image name etc script prw_loadprefs property prw_newimagename : "" end script try set prw_loadprefs to load script file thePath tell application "Finder" set new to choose file with prompt "Select your new image: Should be Macintosh HD_asr.dmg" set the name of file new to prw_newimagename of prw_loadprefs end tell on error setimagename() end try end retreiveimage
I just included the code for the the area I believe should do the permission change.