By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,948 Members | 1,522 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,948 IT Pros & Developers. It's quick & easy.

File Comparisment

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Hi,

Take a look at the fileinfo class.
http://msdn.microsoft.com/library/de...classtopic.asp

http://msdn.microsoft.com/library/de...mberstopic.asp

Ken
----------------------
"MadCrazyNewbie" <te**@nospam.com> wrote in message
news:bC********************@karoo.co.uk...
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

Nov 20 '05 #2

P: n/a
MadCrazyNewbie wrote:
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/Co...32/article.asp

Cheers

Arne Janning
Nov 20 '05 #3

P: n/a
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/Co...32/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

Nov 20 '05 #4

P: n/a
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

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:eU*************@TK2MSFTNGP11.phx.gbl...
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/Co...32/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

Nov 20 '05 #5

P: n/a
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
Nov 20 '05 #6

P: n/a
* "Cor Ligthert" <no**********@planet.nl> scripsit:
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.


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>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.