On 26 September 2016 at 13:17, R Smith wrote:
> sqlite3.exe dropped.db "INSERT INTO DropDB_log(date, ip_address, status)
> VALUES (%DATE%, %%A, '%STATUS%');"
YES!
During my lunch break, I don't know why it didn't click to make this a
loop until I got back and saw your
Correction:
FOR /F "tokens=1" %%A IN (machinelist.txt) DO (
sqlite3.exe dropped.db "INSERT INTO DropDB_log(date, ip_address,
status) VALUES (%DATE%, %%A, '%STATUS%');"
)
The file SET must be in parentheses.
On 2016/09/26 10:09 PM, R Smith wrote:
I can't test this since I don't have your
I can't test this since I don't have your file or DB, but it should put you on
the right track. This example assumes only 1 IP address on each line and will
ignore any other tokens.
FOR /F "tokens=1" %%A IN "machinelist.txt" DO (
sqlite3.exe dropped.db "INSERT INTO DropDB_log(date,
On 26 Sep 2016, at 8:34pm, jungle Boogie wrote:
> I'm attempting to make a windows batch file that reads a text file and
> inserts a new record for each entry:
Why not replace the INSERT command with a '.import' command to import data from
a CSV (or some other
Hi All,
I'm attempting to make a windows batch file that reads a text file and
inserts a new record for each entry:
sqlite3.exe dropped.db "INSERT INTO
`DropDB_log`(`date`,`ip_address`,`status`) VALUES
(%DATE%,readfile('machinelist.txt'),'%STATUS%');"
Right now, it does this:
5 matches
Mail list logo