View Single Post
  #6  
Old October 8th, 2002, 10:52 AM
sixthring sixthring is offline
Support Specialist
 
Join Date: Jul 2002
Posts: 64
Thanks: 0
Thanked 0 Times in 0 Posts
sixthring is on a distinguished road
Here is a simple backup script. I gives some good examples of the correct way to write a script.

-- DO NOT MODIFY THESE ITEMS!

global localUser
global backupVolume


-- ********************* BEGIN MODIFICATION AREA! ***************
-- Modify the the items in quotes on lines below to match your specific setup.
-- AT the end of each line you will see an complete explanation of what that variable does.


set localUser to "johndoe" -- MODIFY: Enter your local user folder's name here.
set backupVolume to "Backup" -- MODIFY: Specify the name of your backup volume/disk here.

-- Test the script to make sure it works, and once it does, save it as an application to whatever location you want -- then setup CronniX to run it for you automatically.

-- ********************* END MODIFICATION AREA! *********************


tell application "Finder"
if folder localUser of disk backupVolume exists then
delete folder localUser of disk backupVolume
empty trash
copy home to disk backupVolume
else
copy home to disk backupVolume

end if
end tell
Reply With Quote