Returning properties with 'FileSearch'

hqengint

Registered User.
Local time
Today, 14:45
Joined
Jul 16, 2002
Messages
13
Here is my problem: I am using VB to import text files into an Access Database. This is done, but currently it will only do one file at a time. I am now trying to get my program to search for the files I am interested in and import them. This is simple enough and I have the code written to do it. However, since these text files are continuously being added (every day), I only want to import the files since the last time that I imported a batch. The idea I have for accomplishing this is to compare the last modified date property of the text files and only import those modified after I imported them last. Now, you would probably tell me that I can use the last modified criteria in under the FileSearch command, but that, also, is not what I am looking for. The problem is that certain files will have different modified dates that I must look at. Let me explain my problem more clearly:

The text files that I want to import contain hourly data produced by a wind turbine. These files are usually created every day. There are nine different wind turbines. I would like to be able to search the directory and return all of the files for all of the turbines. However, the date the most recent file was produced may be different for the different turbines. Therefore, I must compare different last modified dates for each of the turbines.

The simplist way that I can think of doing this is by returning the 'LastModified' property with FileSearch Command. However, it only appears that opon execution, the FileSearch Command only returns the file name (complete with path). Is there a way that I can return a file property with the 'FileSearch' command?

Any advice would be greatly appreciated. Thanks.
 
To make life easier is to import a file and then move it to an Archive directory.

This way:

1. Only the files that need to be imported are in the read directory.

2. You can move the file back in when necessary.

3. You don't have to come up with a complicated system of keeping track of dates.
 

Users who are viewing this thread

Back
Top Bottom