Update Remote Folders v1.2.2
Update Remote Folders v1.2.2
- Subject: Update Remote Folders v1.2.2
- From: Victor Yee <email@hidden>
- Date: Fri, 27 Apr 2001 02:02:48 -0400
Recently finished a script for a friend and thought that others might be able to use it (or parts of it).
Here's a description from the comments:
"Update Remote Folders v1.2.2
A droplet to selectively synchronise the contents of local folders with the contents of remote folders.
Its purpose is to help reduce network traffic (afp/ip) by syncing only updated and new files.
The synchronizing occurs only one-way (local --> remote).
This script was created for a specific network environment.
Modify, as necessary, for other environments (some flexibility was built into the script).
Required scripting additions:
- Akua Sweets <
ftp://ftp.akua.com/pub/mac/AkuaSweets/AkuaSweets141.sit.hqx>
- Standard Additions (part of standard MacOS install)
Procedure:
1) Search mounted volumes for a target folder matching the name of the source folder.
2) Compare the contents of the source and target folders and generate lists of:
Source Differences - files and folders only in the source folder.
File Intersections - files common to both folders.
3) Apply actions to the lists:
Source differences will be duplicated to the target folder.
Intersections will be compared by mod date, with newer files in the source to replace files in the target. "
The script is set to run in testing mode, which means that only a run-time log of the update is made (nothing is actually copied or updated) and the log is only made in memory, not written to disk. To generate this log, one of the following text editors is used: QuoEdit, Tex-Edit Plus, or Style. No other text editors were tested (although, with the appropriate changes, other scriptable text editors would work). The script will automatically choose one that's available on disk (see script code).
I had to move part of the comments to a separate readme file in order to get the script to open in Script Editor (down to 29427 bytes).
With all comments intact, the text counted to 31144 bytes.
With all comments removed, it added up to 23661 bytes.
In any case, here's both the readme and the script text, stuffed and binhexed to about 13K:
http://www3.sympatico.ca/victor.yee/applescript/scripts/UpdateRemoteFolders.sit.hqx
Regards,
Victor
p.s. Run and tested on MacOS 9.04 over a network and on 9.1 locally and seems to work well, but YMMV.