PDA

View Full Version : Updating existing files



NewsArchive
09-06-2011, 01:41 AM
My installer is made up of all the files required by my application and when
it runs SB decides what files are required to replace those on the target
machine.

I am now reviewing my script and wondered if there is any major difference
(besides the functionality of course) between Check File (Date and Time) and
Check File CRC. Is one slower than another?

My installer is about 40mb so does have a large number of files and most of
the time only a few are updated (say about 20 out of 300) but I find it
easier to add them all so that the installer can act as a new demo, updater
or maintenance model.

So is there any advantage of one replacement method over another or is it
simply down to preference.

TIA

John Fligg

NewsArchive
09-06-2011, 01:42 AM
John,

It depends on the size of the file. "Check File (CRC)" calculates the
CRC-32 value of a file and so in general it is always slower than a simple
file/date stamp check. But a 40MB installer with only 300 files is a small
install so the performance difference is not significant.

When doing a "Check File (CRC)" then an existing file is overwritten if its
binary contents is not the same as the new file.

When doing a "Check File (Date/Time)" then an existing file is overwritten
if its modification date and time are older than the new file. Note: it's
possible that the new file and the old file have the very same binary
contents even if the date/time stamp is different.

Friedrich