File Syncronizing
File Syncronizing
- Subject: File Syncronizing
- From: email@hidden
- Date: Fri, 16 Feb 2001 00:29:39 EST
Hi all! Since I started getting into OneClick's EasyScript last year, I've
been slacking on my AppleScript. I am now faced with a situation that should
be fairly simple, but try as I may, I can't figure it out:
I am trying to set up a script that will compare the System Folder:Colorsync
Profiles folder on all workstations to a set of master profiles located on a
server. The script will delete any profiles that are not in the master set
and copy every profile in the master set that is not in the local set.
I have already created the script, but it is slow. I can't post it now
because it's at work, but basically the part I am having trouble with is with
getting the information from the Finder.
I first get every file of the local profiles folder and set the list in a
variable. Then I get the list of every file in the master set and set that in
a variable. Then I have a repeat loop that checks every file in the local set
to see if it's in the master set (by file name) and if it is, then checks if
the modification dates match. If they match, it moves on, otherwise it
deletes the file in the local set.
Then I step through each file in the master set and if it's not found in the
local set, it is set to another variable which collects a list of files to
copy. When done checking all files, I use the duplicate command to copy the
list of files to the local folder.
The script works correctly, but in both repeat loops, it's very, very slow to
get the file names and then the modification dates. What would be the fastest
way to obtain this information and make the comparison? Also, is there a
better way to syncronize than the double repeat loops?
Thanks in advance.
Ken Fleisher
email@hidden
p.s. I tried to e-mail the script to myself earlier today so I could post the
relevant part tonight, but it didn't arrive properly (I can't decompress it
for some reason). If it would help to see it, I'll grab it tomorrow.