I've never used the FC command before, but after a very quick look, I can
tell you it won't do a compare on binary/zipped files.
If it's just text files, then yes, it's suitable. However, IMO I think it's
a clumsy way as well.
One step up from using FC is to use WinDiff or similar.. but again clumsy.
Personally, if you just want to check that the file was copied OK, and IF
there are any differences (i.e. not what they are) then you can use many
properties of the file as check items. For instance, the file size,
revision (if it's an exe), date last modifed, date created, etc.
To answer your question about File.Copy being sufficient... I believe there
are enough fail-safe routines in Windows itself to copy the file correctly -
if it's not a good copy, you'll get some sort of exception or other error.
HTH
__________________________________________
The Grim Reaper
"RitaG" <Ri***@discussions.microsoft.com> wrote in message
news:FA**********************************@microsof t.com...
Hi.
In a VB.Net program I use File.Copy to copy some zipped (and text) files
from one server to another. I'm required by management to do a file
compare
after the copy has completed.
Is the File.Copy sufficient and it will error out if there's a problem or
do
I need to do a file compare to make sure nothing went wrong in the copy?
If I do need to do a file comapre I was thinking about shelling out and
running a bat file to use the Dos "FC" and pipe the results to a file
which I
can then search for "no differences found".
This seems to be a clumsy way and I'm thinking there must be something
more
efficient out there.
Thanks,
Rita