• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
I'm going insane here
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I'm going insane here


  • Subject: I'm going insane here
  • From: Ben Bishop <email@hidden>
  • Date: Mon, 06 Aug 2001 15:06:09 -0500

I've got a small scripting question for you all. I've been having trouble
writing a backup script for our Entourage users. The problem seems so simple
that it's driving me crazy (not that I've got far to go).

I want to copy the main identity, delete the old backup, and paste the new
main identity to a file on the server. I've tried sorting the remote file by
creation date and then deleting the oldest one but that doesn't work as
intended. The script just ignores the new file, sees the old one and quits
without copying. It does not give me an error either.

I'm using OS 9.1 and Office 2001 on all of the machines to be backed up. At
any rate, I've babbled long enough. Here's a copy of the script for you to
peruse, if you find any glaring errors please let me know and I'll correct
them.

--1st step is to simply use record to find the exact path to the files you
are backing up and the location you're backing up to
tell application "Finder"
activate
select folder "Office 2001 Identities" of folder "Microsoft User Data"
of folder "Documents" of startup disk
open selection
--next step, delete the copy of Main Identity if needed, I don't know
why it doesn't move the selection. Only copiesk
select folder "Main Identity copy" of folder "Office 2001 Identities" of
folder "Microsoft User Data" of folder "Documents" of startup disk
delete selection
--this next step will copy the file to be backed up
select folder "Main Identity" of folder "Office 2001 Identities" of
folder "Microsoft User Data" of folder "Documents" of startup disk
duplicate selection
--now to delete the prior backup so that you'll always have the most
current one
select disk "DataDrive"
open selection
select folder "Bud" of folder "Backup" of disk "DataDrive"
open selection
select folder "Main Identity copy" of folder "Bud" of folder "Backup" of
disk "DataDrive"
delete selection
--now comes the entire reason we wrote the script.....The actual backup
process!!!!
select folder "Main Identity copy" of folder "Office 2001 Identities" of
folder "Microsoft User Data" of folder ,
"Documents" of startup disk
move selection to folder "Bud" of folder "Backup" of disk "DataDrive"
--clean up shop now..Nothing says I love you like a script that closes
it's own windows.
close container window of folder "Office 2001 Identities" of folder
"Microsoft User Data" of folder "Documents" of startup disk
close container window of folder "Bud" of folder "Backup" of disk
"DataDrive"
close container window of disk "DataDrive"
end tell
--have our little script shut down the computer and go home. Have a nice day
tell application "Finder"
shut down
end tell



Sincerly and most gratefully,



Ben Bishop
just some guy in Oklahoma


"Remember, eagles may soar but weasels don't get sucked into jet engines."


  • Follow-Ups:
    • Re: I'm going insane here
      • From: Emmanuel <email@hidden>
  • Prev by Date: Re: Mount network drive (Win2k server)
  • Next by Date: Re: How do you make Location Manager run an app on location changes?
  • Previous by thread: Re: Mount network drive (Win2k server)
  • Next by thread: Re: I'm going insane here
  • Index(es):
    • Date
    • Thread