Forum Discussion
sathishkm
Mar 28, 2022Copper Contributor
Importing Multiple Text Files
Hi All, Is there a way to import multiple text file in MS access database. I have more than 50 - 60 file every time I need to import in access database.
mrman17
Aug 18, 2023Copper Contributor
I know I am late to the party with this, but I thought I'd add my solution for anyone else with the same "problem" in the hope it will help them.
You will need to use the command prompt and navigate to the folder containing your data files.
At the prompt, type the following (assuming the extension is "csv" - change this to "txt" if needed):
copy /b *.csv _allfiles.csv
This will copy (or merge) all the files with the defined extension into one file. The underscore at the start of the filename will put it at the top of the list to make it easier to find.
This does rely on all the files having the same column structure, and you may have to go through the generated file to remove any column headers.
Daniel_Azzam
Feb 13, 2024Copper Contributor
Thank you