Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

opening groups of text files for import

Status
Not open for further replies.

amberH

Programmer
Joined
Jun 10, 2002
Messages
36
Location
CA
Hello,
I've been working on a database that opens up text files, and imports data into Access. I have the import function working almost perfectly, but now I'm stuck.
The files that I need to open up are always in the same folder. The file names are 2 letters, followed by numbers. Each new file that is made, the numbers go up by one. There is no set number of text files created in a day...it varies.
What is the best way to program it so that it gets every new text file in the folder, every day???
Thanks in advance,
amber
 
Do the numbers reset every day or do they just keep going? You could put the number of the last file in a table when you've finished downloading and then just select files with numbers. since it's an alpha, the numbers will not appear in order (11 will appear before 2), so you will need to read the file name, pick off the number portion, convert to numeric, compare with the number of the last file downloaded and either bring it in or go on to the next.

There is also a way to get the date created for a file, (but I don't remember how it was done) so you could use that to get the next day's stuff.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top