in reply to Re: Best practices for file synchronization? (Mod time vs. contents compare)
in thread Best practices for file synchronization? (Mod time vs. contents compare)

Thanks, I'll give MD5 a try, assuming it's available. Also, by my understanding, File::Compare stops comparing once a difference is found; as I understand it calculating an MD5 sum requires reading in the entire file. It will be interesting to see how the two bench out.

Thanks,

T

_________________________________________________________________________________

I like computer programming because it's like Legos for the mind.

  • Comment on Re^2: Best practices for file synchronization? (Mod time vs. contents compare)

Replies are listed 'Best First'.
Re^3: Best practices for file synchronization? (Mod time vs. contents compare)
by ikegami (Patriarch) on Jun 12, 2006 at 18:42 UTC
    He's doing "one-way synchronization of directory trees In Windows". If that means he's doing archiving, he only needs to compute the MD5 of the archived file once. That means that MD5 requires that one file be read fully, whereas File::Compare requires two files to be read in part or in full.
      Ikegami, you raise a very interesting point. So where would I store the already-calculated MD5s from last time? In a text file of some sort?

      _________________________________________________________________________________

      I like computer programming because it's like Legos for the mind.

        Sure. Anywhere.
      Results in a bit.

      _________________________________________________________________________________

      I like computer programming because it's like Legos for the mind.