Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Array vs. Cells

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.

--
Regards

Robin
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Array vs. Cells

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

"Robin Clay" <Robin_B DOT Clay AT virgin.net wrote in message
...
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.

--
Regards

Robin


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Array vs. Cells

"RB Smissaert" wrote:

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 !

--
Regards

Robin

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Array vs. Cells

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


"Robin Clay" <Robin_B DOT Clay AT virgin.net wrote in message
...
"RB Smissaert" wrote:

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 !

--
Regards

Robin


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Array vs. Cells

Greetings !

"RB Smissaert" wrote:

I don't need to put the data into the spreadsheet

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.


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Array vs. Cells

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

"Robin Clay" <Robin_B DOT Clay AT virgin.net wrote in message
...
Greetings !

"RB Smissaert" wrote:

I don't need to put the data into the spreadsheet

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.



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Array vs. Cells

"NickHK" wrote:

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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with cells Array Ayo Excel Discussion (Misc queries) 5 August 7th 08 09:02 PM
combining cells and array from different sheets into an array to pass to IRR() [email protected] Excel Discussion (Misc queries) 3 September 11th 06 07:17 AM
Can a UDF be used on an array of cells? Paul D. Simon Excel Worksheet Functions 3 September 8th 05 06:23 PM
Count if array contains cells of a certain value Melissa Excel Worksheet Functions 2 July 29th 05 02:37 AM
How do I sum an array of cells, even if some of them are #N/A René Excel Discussion (Misc queries) 5 January 18th 05 02:28 PM


All times are GMT +1. The time now is 06:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"