Home |
Search |
Today's Posts |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() prepotency Wrote: I don't follow your terminology. You're saying to write a file compose of all the file names and then read in from that file to find all th files that the code will then parse? Please elaborate. No, There are a couple of ways to do this. First you could move the file to a 'processed' directory, thereby onl having files that need to be processed in the directory that you ar scanning, or When you use the DIR function to get the file name from the director that you are about to process, before you actually process that fil you generate a hash code from the file name. A hash code is a number that is generated by a hashing algorithm. (Check on the web using google...) The number generated would be a almost unique number that identifies that file. You would use thi number as a record pointer into a random access file. That file might have a structure like: Code ------------------- Type Audit_Record RecType as String * 2 Load_Date as Date End Type ------------------- When you then read that record using something like: Code ------------------- Get #Audit_File, File_Hash ------------------- where File_Hash is the hash number generated for the file name, if th file has not been processed then RecType will be blank. After you have completed the processing for the current file then yo would write a record to the Audit file with the values completed, using the generated hash code as a record number. In this way you would not only record when the file was processed, bu also that it has actually been processed, which you can find ou extrememely quickly without even opening the file. For more on hash tables etc (even though it is in a differen programming language) you could have a look a http://sapsuperusers.com/phpBB2/viewtopic.php?t=503 which shows ho hashing algorithms work. Regards Ric -- Rich_ ----------------------------------------------------------------------- Rich_z's Profile: http://www.excelforum.com/member.php...fo&userid=2473 View this thread: http://www.excelforum.com/showthread.php?threadid=38663 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Input Box Question | Excel Discussion (Misc queries) | |||
Input Box Question | Excel Discussion (Misc queries) | |||
Extracting data from one xls file and input into another xls file | Excel Discussion (Misc queries) | |||
Input Box Question with Code | Excel Programming | |||
Input box question | Excel Programming |