How do I open a database file located in a specific folder in sqlite3?

I have this chinook.db database file that I have stored in C:\sqlite\db, and everytime I try accessing it using the sqlite shell by the command .open C:\sqlite\db\chinook.db, sqlite creates a sqlitedbchinook.db database file in the home directory. Why is this happening and how do I resolve my issue ?enter image description here

>Solution :

From Command Line Shell For SQLite:

….You might want to use a full pathname to ensure that the file is in
the directory that you think it is in. Use forward-slashes as the
directory separator character. In other words use "c:/work/ex1.db",
not "c:\work\ex1.db".

Change to:

.open "C:/sqlite/db/chinook.db"

Leave a Reply