SQLite Forum

Input from Windows Batch file
Login
Here is one approach:
<ol><li>

Apply the source-code patch shown at 
<https://www.sqlite.org/src/info/6c716f4b556ea8f9>.
(This change will likely be part of the next release.)

<li>Prepend your script with `|` and make it the argument to ".read":

~~~~~
    .read '| "D:/SQLite32/SCRIPTS/Techniques/N Random Records.BAT" tblSalesRevenue 10'
~~~~~

Note that quoting is important in the example.  The entire command
is quoted by '...'.  Internally, the command uses "..." around the
name of the script, as the script name contains spaces.
</ol>

Edit: Reformatting to work around Markdown goofiness.