Re: Backup Script Improvements Please
Re: Backup Script Improvements Please
- Subject: Re: Backup Script Improvements Please
- From: Chris Adams <email@hidden>
- Date: Wed, 24 Oct 2001 10:26:37 +0000
On 10/24/01 2:04 PM Xandra Lee wrote:
>
Following is a basic script to backup a file - (which may be backed up
>
numerous times in one day), it seems 'Much Ado' about nothing (very
>
wordy) and has some weeknesses (most notably uses mod time as method to
>
avoid dup names -- which severely limits legnth of orig file names)
>
Here is one that I use (online here):
http://www.cypresslakestudios.com/applescript/index.html#backupMailAndScript
s
It is fairly wordy also, but renames folders instead of the files. this way
you do not have to constantly name and unname files: just look in the
appropriate folder. This script backs up a number of files to a zip disk.
There is another one at the same web address that backs up to a CD.
-- BEGIN SCRIPT
(*
Find additional folders to backup by recording file and folder selectioons
from the finder.
By selecting the folder the entire folder and contents are saved to the
disk.
This is not the best backup program around, but it is painless enough that I
actually do it regularly!
*)
tell application "Finder"
activate
-- mail backups sometimes take longer than one minute, the default timeout.
-- I set the timeout to x minutes but I have had to keep updating it.
with timeout of 300 seconds -- allows plenty of time for a mail backup.
-- setup values
set theTargetDisk to disk "Zip 100"
set thedate to current date
set datestring to month of thedate & " " & day of thedate & ", " & year of
thedate
set foldername to "BACKUP MAIL " & datestring
-- backup mail
set targetfolder to (make new folder in theTargetDisk with properties
{name:foldername})
select contents of folder "Main Identity" of folder "Identities" of folder
"Microsoft User Data" of folder "Documents" of startup disk
copy selection to folder foldername of theTargetDisk
-- backup scripts folder
set folder2name to "BACKUP SCRIPTS " & datestring
set targetfolder to (make new folder in theTargetDisk with properties
{name:folder2name})
select folder "Scripts" of folder "System Folder" of startup disk
copy selection to folder folder2name of theTargetDisk
-- backup bbedit scripts
select folder "BBEdit Scripts" of folder "BBEdit 5.1" of folder "BBEdit 5.1
Folder" of folder "authoring" of disk "My HD and applications"
copy selection to folder folder2name of theTargetDisk
-- backup livestage scripts
select folder "AppleScripts" of folder "LiveStage Professional" of folder
"authoring" of disk "My HD and applications"
copy selection to folder folder2name of theTargetDisk
-- backup one startup script
select file "open IE and OE" of folder "Startup Items" of folder "System
Folder" of startup disk
copy selection to folder folder2name of theTargetDisk
end timeout
end tell
-- END SCRIPT
>
>
Alixandra Leigh
>
AceDesign
>
email@hidden
>
------------------------------------------
>
Furniture:
>
> <http://home.rochester.rr.com/alexleighs/furniture/furniture.htm>
>
Renderings:
>
> <http://home.rochester.rr.com/alexleighs/interiors/interiors.htm>
>
_______________________________________________
s
>
Hope that this helps:
Chris
--
Chris Adams
Cypress Lake Studios
Hypermedia, Quicktime, and Internet Design
http://www.cypresslakestudios.com
email@hidden