Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need help with cells Array | Excel Discussion (Misc queries) | |||
combining cells and array from different sheets into an array to pass to IRR() | Excel Discussion (Misc queries) | |||
Can a UDF be used on an array of cells? | Excel Worksheet Functions | |||
Count if array contains cells of a certain value | Excel Worksheet Functions | |||
How do I sum an array of cells, even if some of them are #N/A | Excel Discussion (Misc queries) |