Include subfolders in data source path of Microsoft Access Text Driver

Hello,
I have used the Connection String found here to connect to various txt files on my PC, located in C:\test\

This is working for this:
Driver=Microsoft Access Text Driver (*.txt, *.csv);Dbq=C:\test;Extensions=txt;Format=Delimited

Now I want to connect also txt files in subfolders, such as
C:\test\subfolder1\test1.txt

I tried several modifications on the connection string like wildcards and so on, but I dont get it to work.

Is there a possibility to include the txt files in subfolders?

If not, is there another available Driver which I can use for that?

Thanks in advance

1 answer

Hello,
in this connectionstring each forder is like diffrent data base and text file in forder is like table. If you need use data from subforder define this in sql querry eg:

select *

from

openrowset(
'MSDASQL'
,'Driver={Microsoft Access Text Driver (*.txt, *.csv)}'
,'select * from C:\test\Subfolder1\test1.txt'
)