This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - How to Compare timestamps ?

vikramjain23 - Wednesday, May 25, 2011 11:30 AM:

Hi,

I need to compare a file in vault with the downloaded copy ( in user working directory) programmatically (IOM/VB).

I only need to know if they are identical or not !

Any clues ?

Regards,

Vikram Jain



Yoann Maingon - Wednesday, May 25, 2011 11:48 AM:

Hi Vikram,

I didn't something like that in a developement for the Autocad connector for which you can find sources on prodeos.codeplex.com

Not sure my method was really good but it worked to check if the local version was the latest one.

you can check this : http://prodeos.codeplex.com/SourceControl/changeset/view/48811#944446

watch the method called : GetLocalFileinfo()

and then get back to this form: http://prodeos.codeplex.com/SourceControl/changeset/view/48811#944463

and look for CheckCachedFileStatusToolStripMenuItem_Click()

Good luck !

Yoann




eric_h - Friday, May 27, 2011 12:58 PM:

Vikram,

My first thought when reading this was to run a checksum/hash (e.g. md5 or sha1) against each file and compare. But I would have no clue how to program that up. I took a quick look at the code Yoann pointed you to, and it uses md5 checksums, so that might be useful for ideas.

Eric