Automating import of dynamic text file into MS Access

F

FuzzyLogic

I've been doing Google searches for hours on this subject without
finding exactly what I'm looking for, so before I settle for something
different than what I really want to do, I figured I'd ask the
experts...

I'm taking it upon myself to set up a syslog server in a primarily
Windows Server 2003 environment, using free software and scripts I've
collected from the web (have no budget, this is just something we need
and I'm tired of trying to convince people of that.) What I have so far
is a syslog server that collects event log information from multiple
Windows Server 2003 machines and dumps them into a
continuously-updating text file. On a weekly basis, this text file is
dumped to another directory on the syslog server as a text file with a
time and date stamp.

What I'd like to do is create an MS Access database wherein these text
logs are automatically imported to give our IS department access (no
pun intended) to the event logs using a versatile front end (MS
Access.) Trouble is I have no MS Access experience, so I'm stumbling
along. Cruising Google Groups, I've found out how to do an initial
import of one of these text files using the Import Wizard, and how to
set it up to columnize the data properly. Then I read how to create a
macro to perform this function. Fantastic.

One hitch...The macro is dependant upon a text filename that does not
change. I've found that I can make the macro prompt a user for a
filename to import, but I'd really like to make this hands-free if at
all possible. Is there any possible way I can automatically import
these text files into Access (using a macro, vbs, whatever) when the
file name of each newly-created text file will change? For example, the
first archived log file would be named "Syslog07-23-06.txt" but the
next would be "Syslog07-30-06.txt", and so forth.

Hopefully some of you will consider this a piece of cake, because it's
way beyond me.

Thanks,

FL
 
P

Pieter Wijnen

Check Out DoCmd.TransferText

Pieter

FuzzyLogic said:
I've been doing Google searches for hours on this subject without
finding exactly what I'm looking for, so before I settle for something
different than what I really want to do, I figured I'd ask the
experts...

I'm taking it upon myself to set up a syslog server in a primarily
Windows Server 2003 environment, using free software and scripts I've
collected from the web (have no budget, this is just something we need
and I'm tired of trying to convince people of that.) What I have so far
is a syslog server that collects event log information from multiple
Windows Server 2003 machines and dumps them into a
continuously-updating text file. On a weekly basis, this text file is
dumped to another directory on the syslog server as a text file with a
time and date stamp.

What I'd like to do is create an MS Access database wherein these text
logs are automatically imported to give our IS department access (no
pun intended) to the event logs using a versatile front end (MS
Access.) Trouble is I have no MS Access experience, so I'm stumbling
along. Cruising Google Groups, I've found out how to do an initial
import of one of these text files using the Import Wizard, and how to
set it up to columnize the data properly. Then I read how to create a
macro to perform this function. Fantastic.

One hitch...The macro is dependant upon a text filename that does not
change. I've found that I can make the macro prompt a user for a
filename to import, but I'd really like to make this hands-free if at
all possible. Is there any possible way I can automatically import
these text files into Access (using a macro, vbs, whatever) when the
file name of each newly-created text file will change? For example, the
first archived log file would be named "Syslog07-23-06.txt" but the
next would be "Syslog07-30-06.txt", and so forth.

Hopefully some of you will consider this a piece of cake, because it's
way beyond me.

Thanks,

FL



--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top