File Comparisment

  • Thread starter Thread starter MadCrazyNewbie
  • Start date Start date
M

MadCrazyNewbie

Hey Group,

Hope your all well?

I have a File (Access Database) on my Network (Mapped Drive), and also a
copy on my Local Machine. When my App Starts I would like it to check to
make sure the Local Machine has the same file as on the network, and if not
throw a question asking if i would like to copy the new network version on
to my local machine.

I guess I would check the file size, data and time last modifyed, i just
don`t know how. I`ve looked on the net but carn`t see much.

Many Thanks for any help in advance.

Regards
MCN
 
MadCrazyNewbie said:
I have a File (Access Database) on my Network (Mapped Drive), and also a
copy on my Local Machine. When my App Starts I would like it to check to
make sure the Local Machine has the same file as on the network, and if not
throw a question asking if i would like to copy the new network version on
to my local machine.

I guess I would check the file size, data and time last modifyed, i just
don`t know how. I`ve looked on the net but carn`t see much.

Hi MadCrazyNewbie,

one solution might be to calculate hashes over the two files and compare
the results.

A good start how to implement this can be found here:
http://vbaccelerator.com/home/NET/Code/Libraries/CRC32/article.asp

Cheers

Arne Janning
 
Hi Arne,

one solution might be to calculate hashes over the two files and compare
the results.

A good start how to implement this can be found here:
http://vbaccelerator.com/home/NET/Code/Libraries/CRC32/article.asp
Why would he do that, I write that because most regulars know Simon.
He is fast afraid that he does something not well.

Simon needs to know if the latest file on his client is the same as on the
server and when not he replaces the local one by the server one.

There is no reason to know what is the difference, he even can replace it
withouth asking ( I do not see why he does not do that, however that is his
decission). And therefore in my opinion the answer from Ken fits.

(More written for Simon than for you I see now)

:-)

Cor
 
Hey All,
Thanks for your replys.

Cor,
The reason i would like it to ask is some of us will be using the prog over
a Mobile phone using GPRS or over a 56k dial up when were out and about, and
all ready my DB is about 8megs. It would get rather slow coping it over.

Many thanks again all
Si
 
Hi Simon,
The reason i would like it to ask is some of us will be using the prog over
a Mobile phone using GPRS or over a 56k dial up when were out and about, and
all ready my DB is about 8megs. It would get rather slow coping it over.
I understand that now however why not use as well add an zipp procedure.

You should always be possible to do that with the process.start and the
winzip.exe for commandline. (there are more I saw)

http://www.winzip.com/prodpagecl.htm

However I think there are even better methods, I am almost sure that
Herfried has a link for you.

Cor
 
* "Cor Ligthert said:
I understand that now however why not use as well add an zipp procedure.

You should always be possible to do that with the process.start and the
winzip.exe for commandline. (there are more I saw)

http://www.winzip.com/prodpagecl.htm

However I think there are even better methods, I am almost sure that
Herfried has a link for you.

About zipping?

<URL:http://www.icsharpcode.net/OpenSource/SharpZipLib/>

The VB.NET Resource Kit contains zipping functionality too:

<URL:http://msdn.microsoft.com/vbasic/vbrkit/>

It contains ComponentOne Zip for .NET:

<URL:http://www.componentone.com/products.aspx?ProductCode=1&ProductID=26>

Using J#'s zip functionality:

<URL:http://msdn.microsoft.com/msdnmag/issues/03/06/zipcompression/print.asp>
 
Back
Top