How to import multiple CSV files to a postgres table using pgadmin or other method? I'm looking to import a folder of over 100+ csv files into one table on PostgreSQL using pgadmin. I have the following script but is there a way to change the file path to all csvs?

COPY schema.table FROM ‘C:\Documents\Data’ DELIMITER ‘,’ CSV HEADER;
Use your computer's command-line environment to list the names of all the files in your directory


On windows, use cmd + dir or PowerShell+gci 
On macOS, probably terminal+ls
This might also be a good opportunity to familiarise yourself with psql and the meta-commands which you could use for this purpose

Use the list of files to create the commands you want


Some people use excel for this
I prefer multi-line editing in something like VSCode

Manually tweak your commands line-by-line or change the formula/process you used in step 2 until you get the output you want.


Gl;hf ;)