LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default File Input Question


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
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
Input Box Question bumper338 Excel Discussion (Misc queries) 4 March 20th 07 11:18 PM
Input Box Question StGermain Excel Discussion (Misc queries) 2 March 12th 07 05:14 PM
Extracting data from one xls file and input into another xls file trainerbro Excel Discussion (Misc queries) 1 November 1st 06 08:57 PM
Input Box Question with Code sebastienm Excel Programming 0 August 16th 04 07:37 PM
Input box question losmac Excel Programming 0 August 20th 03 10:32 PM


All times are GMT +1. The time now is 10:46 PM.

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

About Us

"It's about Microsoft Excel"