"arno" <noreplyAThighiqDOTnl@xxxxxx> wrote in message
news:MPG.23ca2692e78a0396989682@xxxxxx
>
>
> Hi,
>
> I am about to develop a WSH script that will compare files (office
> templates) in a central storage location to local files, and copy them
> to the local system if necessary. Lots of users, heterogenous setup OS-
> wise.
>
> There are quite a lot of files to compare (>300). and some of them are
> rather big (>3MB). Copying them over a VPN connection will take a bit of
> time.
>
> The script will be started from VBA code using a timer.
>
> The idea is to have local user templates be updated without user-
> intervention and without disruption of the users normal routines.
>
> The script will essentially be a recursive algorhythm that will compare
> files on the server to files on the local system, and copy them if the
> files on the server are newer (in essence, a one-way syncing mechanism).
>
> Since it can potentially involve heavy copying, I am worried about what
> happens if a user shuts the system down.
>
> 1. What happens if a FileCopy operation is in progress?
> 2. what happens if the scripts routine (compare/(copy)/recurse) is still
> in progress?
>
> As to 1., will the operation be aborted, potentially leaving the user
> with a corrupted new copy of a file?
> As to 2., is there a way to do something like 'windows is shutting down
> event so exit'? Is it needed?
>
> Any thoughts are much appreciated,
>
> TIA,
> arno I have a comment about the comparison problem:
Why not set up a script on all of the machines that will create a table of
checksums for all these files of interest on the system; they might update
the checksums on a regular basis or on demand from a central location. This
would require minimal bandwidth and would spread the bulk of the CPU
requirements to minimize the impact on any one system. Then your script
would only have to compare the table entries for the files in question and
only copy those files that are out of date. I think Microsoft's Capicom
object is scriptable and will create CRC32 and MD5 checksums, and is freely
downloadable to those machines on which it does not already reside.
http://www.microsoft.com/downloads/r...DisplayLang=en
-Paul Randall