I'm writing a .bat file that calls sqlite3 shell (opens existing database file) and passes an .sql file with commands into it. It looks like following in .bat file:
sqlite3 %1 < "%~0\..\xtra.sql"
, where %1 is path to database file.
The problem is - in .sql script I need to use filename of database; but I can't find any information which command use to get it. Alternatively,if there is a way to pass parameters into sqlite3 shell (like into windows cmd), I could use it too.