Re: verifying copied folders
From: Kevin J Prince (kevin_at_princ7.demon.co.uk)
Date: 01/31/05
- Next message: Karl E. Peterson: "Re: Word Counting"
- Previous message: Karl E. Peterson: "Re: Allocating memory / Writing large files"
- In reply to: Karl E. Peterson: "Re: verifying copied folders"
- Next in thread: Karl E. Peterson: "Re: verifying copied folders"
- Reply: Karl E. Peterson: "Re: verifying copied folders"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 31 Jan 2005 20:01:55 +0000
Thanks for the reply,
I was rather hoping there was a pre-ordained routine or two ready to do
the job.
My thoughts were to run some sort of algorithm on each file just giving
me a checksum value and then checking the two checksums.
I'm rusty as hell in programming, so need as much help as possible
here...
The idea of reading writing and checking the written stuff in chunks has
already left me cold. How can I do that on an open file.
What I suppose I forgot to mention was that some of the files will be up
to 2 megs in size. So if I have to open and close then open to read and
check then close again, its going to be a long winded process....
Shame there is no Compare or the like in VB.
OK, as always, any further help will be much appreciated, as will any
other ideas as to the process's of the above... problem.
Regards
Kevin
In message <Ou5msx8BFHA.2104@TK2MSFTNGP14.phx.gbl>, Karl E. Peterson
<karl@mvps.org> writes
>Kevin J Prince wrote:
>> How do I copy a whole folder (with sub-folders and files in each
>> sub-folder), then verify each of the folders and files therein, then
>> delete those folders from the original.
>>
>> Any suggestions gratefully received.
>>
>> The overall project includes selecting drive, folder and possibly sub
>> folder, then copying to a different drive, verifying the data then
>> deleting the original.
>
>Sounds like one of the scariest projects I can imagine undertaking! There are
>literally more potential problems there than I could begin to
>enumerate. However,
>*you* will have to. <g>
>
>I'd start slow. Work on enumerating every file from the "root" folder on down.
>You'll probably want to build an array containing all those fully-qualified
>filenames. In the process of that enumeration, keep track of each folder you
>encounter, as you'll need to recreate these on the destination. Then,
>start working
>on copy algorithms. For total control, you'll need to do them
>yourself, block of
>bytes at a time. Then, of course, you'll want to read back what you wrote, and
>compare to the original. I wouldn't begin thinking of actual deletion
>(which will be
>a relative breeze!) until you've exhausted yourself in all these other
>efforts. But
>this is the general idea.
>
>In short, break this down into each of the hundred or so discrete
>pieces, and tackle
>them in a logical order. If/when you have troubles with any specific
>part, holler!
>There's plenty of experience here.
-- Kevin J Prince
- Next message: Karl E. Peterson: "Re: Word Counting"
- Previous message: Karl E. Peterson: "Re: Allocating memory / Writing large files"
- In reply to: Karl E. Peterson: "Re: verifying copied folders"
- Next in thread: Karl E. Peterson: "Re: verifying copied folders"
- Reply: Karl E. Peterson: "Re: verifying copied folders"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|