7
votes

I am trying to run sqlite from the command prompt. So I have this downloaded sqlite-shell-win32-x86-3071100.zip from this website http://www.sqlite.org/download.html

Now there is a set up.exe from which v can run sqlite commands. When I say

C:\Users\..>'sqlite3' is not recognized as an internal or external com

''sqlite3'' is not recognized as an internal or external command,
operable program or batch file.

Any hints.

Thank you Sun

4
Do you have sqlite3 in your system PATH? You can check by using the command "echo %PATH%" in the command prompt. - user849425
I have sqlite3.exe on C:\Stuff. Can u give me an example of a command in sqlite if I run the executable from this location. - user575219
I'm not sure I understand you. It looked like you are trying to run sqlite3 from the command prompt (cmd.exe). If you want to do that you need to have sqlite3.exe in your PATH. Otherwise the command prompt will not know where to find the program and will throw a "cannot find program sqlite3" or similar error. - user849425
navigate to the current directory your sqlite3.exe file is, so in this case cd sqlite3 , the execute the sqlite3.exe this should work. - Sam Jereria Manuel

4 Answers

12
votes

From your windows command prompt, you can start sqlite3 either with:

cd c:\Stuff
sqlite3.exe

or with:

c:\Stuff\sqlite3.exe

Either way, I assume from your comment that sqlite3.exe is in c:\Stuff.

As Michael mentioned, you can also add the path of the directory containing sqlite3.exe to your PATH. Fro a quick search I found this guide: http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx

1
votes

I assume that you already have sqlite in your system path since the instructions on how to do this are clear.

The likely problem is that you have created a folder called sql3 and have put the three executable files in a folder within that folder.

Check that all three executable files are within the file itself.

1
votes

Go to an environment variable and add new environment variable C:\sqlite as I have saved the sqlite3 files under sqlite folder of C drive. It worked for me

1
votes

It maybe possible that when u have extracted files from the downloaded zip folder,2 folders are created of the same name one inside the other. So in the cmd prompt u have to enter that folder 2 times by using . E.g-C:....\sqlite-tools-win32-x86-3330000\sqlite-tools-win32-x86-3330000 and then use sqlite3