BCP Import
How to do BCP import with all files in a folder.
folder
Need to import both the files.
bcp <tableName> in <filename> -t "^" -r "\n" -c -C 28591 -S <databaseinstance> -U <username> -P <password>
Using the above BCP cmd, we can import only one file at a time.
simple BCP command import only single file. To achieve the above we need to use looping with the command.
I have used the following command simple command.
for /r %i in (*) do bcp <tablename> in %i -t "^" -r "\n" -c -C 28591 -S <databaseinstance> -U <username> -P <password>
It works.