I want to be able to make a batch file that will go through each file in a directory and import it inside SQlite3. The problem is that SQlite3 does not accept multiple commands from the command line / package, only 1 command.
I tried:
for %%f in (./tmp/*.csv) do ( echo %%f sqlite3 database.db ".separator '|'" ".import './tmp/%%f' Dirs" )
And I get too many parameter errors, since it expects only one command, whereas I need more than 1.
I also cannot write a second text file that sqlite3 will invoke, since the imported file will change for each iteration.
Help will be appreciated.
source share