File comparison question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bill W.

    File comparison question

    I'm teaching myself VB6. As a first project, I've decided to work on
    a Window's version of the Unix command, "diff" -- with a few twists.
    But being unfamiliar with VB, I am unsure as to how to best compare
    two files and/or directories.

    A byte-by-byte comparison would probably be best but slow, correct?
    What about computing a CRC for each file and then compare those. any
    faster?
    OR
    Compare file-sizes, and create/access times. Would that be a reliable
    enough comparison?

    Any thoughts, comments, suggestions, pointers to sample code, etc.
    welcome.

    Bill W
  • J French

    #2
    Re: File comparison question

    On 29 Sep 2003 08:09:00 -0700, bweissbo@lucent .com (Bill W.) wrote:
    [color=blue]
    >I'm teaching myself VB6. As a first project, I've decided to work on
    >a Window's version of the Unix command, "diff" -- with a few twists.
    >But being unfamiliar with VB, I am unsure as to how to best compare
    >two files and/or directories.
    >
    >A byte-by-byte comparison would probably be best but slow, correct?
    >What about computing a CRC for each file and then compare those. any
    >faster?[/color]
    Calculating a CRC involves reading every byte
    - there is also (a very small) possibility of error[color=blue]
    >OR
    >Compare file-sizes, and create/access times. Would that be a reliable
    >enough comparison?[/color]
    File sizes are Ok - create/access datetimes are irrelevant[color=blue]
    >
    >Any thoughts, comments, suggestions, pointers to sample code, etc.
    >welcome.
    >
    >Bill W[/color]

    Comment

    Working...