Array vs. Cells

G

Guest

Greetings !

I have over 50,000 *.CHK files in seven FOUND.00n folders.

These represent the entire contents of my "My Pictures" Folder.

Most of them have been backed up.

So I wish to run through the first 64 characters of each of my
backed-up files, and compare them inturn with the first 64
characters of those .CHK files.

If I get a match, then I propose to compare the entire content
of the .CHK file with the equivalent length of the backed-up file.

If I get a match on this, then I am happy to assume that I have
that file backed up, and can then delete the .CHK file.


Now my question!

Would it be "better" to load those 64 characters from the .CHK files
into separate rows in the spreadsheet,
or to load them directly into an array in VBA ?

If the former (into Cells), then I would also save
into the same Row the file name, size and path,
to enable me to operate on those files.
 
R

RB Smissaert

Why not backup the whole lot again? It will save you checking!
If you need the data in a sheet in any case then it probably will be faster
to write to an array first and then dump that in the sheet.

RBS
 
G

Guest

RB Smissaert said:
Why not backup the whole lot again? It will save you checking!

Erm... They are .CHK files; some should be .BMP, some .JPG, some .DOC,
etc...

Before I investiagte further, I should like to eliminate those I have
already backed up.
If you need the data in a sheet in any case then it probably will be faster
to write to an array first and then dump that in the sheet.

I don't need to put the data into the spreadsheet, I can bung it into an
array.

I wondered which is the most "efficient".


Thank you very much for your swift response !
 
R

RB Smissaert

Erm... They are .CHK files

OK, misunderstood something there.
I don't need to put the data into the spreadsheet

Do you need an array then? How about just comparing 2 variables?
In any case variables or array will be faster then sheet.

RBS
 
G

Guest

Greetings !

RB Smissaert said:
Do you need an array then? How about just comparing 2 variables?

Well, I have to compare each file from my back-up store (on CDs) with over
50,000 *.CHK files

So I thought I would read in the data from those 50,000+ and put it into an
array or into spreadsheet cells, and then fetch the same data from the backup
files, one by one, and compare it with the array / cells.
In any case variables or array will be faster then sheet.

Ah ! Thank you !

The answer to my question ;)

But I remain open to suggestions !


Thanks again for responding.

--
Regards

Robin
Robin_B DOT Clay AT virgin DOTnet
In the Blackmore Vale, Dorset.
 
N

NickHK

Robin,
No Excel, but..
What if you put all the first 64 chars and the files' lengths into a DB then
just Update a flag if a match found to the data of each backup file. Then
you can investigate the possibles further.
I would have thought a DB working on indexed column would much faster than
loop an array or range.
NickHK
 
G

Guest

NickHK said:
What if you put all the first 64 chars
and the files' lengths into a DB ...
I would have thought a DB working on
indexed column would much faster than
loop an array or range.

You are probably right - but I know little about dataBases !

"Stick with what you know" <grin>

Thank you for your response - maybe I'll see what I can find out....

--
Regards

Robin
Robin_B DOT Clay AT virgin DOTnet
In the Blackmore Vale, Dorset.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top