Macro to import ascii files into a table

I have a large number of  ascii files stored in a folder c:\tmp.
Each file has four columns seperated by tabs. There is no header row.  

Here are a few rows from one file:
08/13/2004      AAC.AX      1.4      7212730
08/16/2004      AAC.AX      1.4      675351
08/17/2004      AAC.AX      1.4      161616

I want to import the contents of these files into a single table, using the same column order.  

Is there a quick and easy way to do this using Access VBA?

Thank you!
Who is Participating?
Erick37Connect With a Mentor Commented:
To correct the DOS syntax, the line from agj should read:
for %f in (*.*) do type %f >> all.txt

Would you prefer a VB solution?
_agj_Connect With a Mentor Commented:
u can combine all of these into a single file using a batch command like:

cd c:\tmp
for %f in <*.*> do type %f >> all.txt

now u can just open this, select all the text and copy paste into an access table.
tomfolinsbeeAuthor Commented:
Thanks agj, I didn't realise you could thing like that with the Dos prompt!

I typed it typed it in exactly as above, including spaces and got this message:

< was unexpected at this time

In case that makes in difference,  I'm using Windows XP and the file names look like this:  AAC.AX_D

tomfolinsbeeAuthor Commented:
Thanks agj and Erick37!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.