Windows Batch files and SQLite - windows

When creating a batch file in Windows for SQLite, can the batch file run any commands after it has entered the SQLite shell? Or is it only possible to add command line options?
What I want to do is create a batch file that that starts SQLite and loads the database I want. Then it runs several SQLite commands and then quits.

Related

creating a file using task scheduler while the windows user lock the system

I have written a bat file and writing the console output to a text file.The bat file is scheduled using the task scheduler to run at prescribed time. The bat file is executing and creating a file while the system user is not locked (I mean windows+L) but when the system is locked batch file is running but the text file is not created.Facing the similar issue with the python code also(writing the output dataframe to an excel file.Is there any suggestion on this . Thanks in advance.

Toad for oracle - open automatically generated script

I have a script generator in .bat file. This .bat generates a sql script and saves it on disk.
Is there any option to open automatically this script in toad? Also if there is already toad application running to open this script in running toad instance?
You can pass the filename to Toad as a command line argument.
Example: >Toad.exe "C:\My Scripts\MyFile.sql"
On the Startup page in Toad's Options there is an option to only allow multiple instances of Toad. If that is unchecked the above call will reuse an open instance of Toad and open your script.

Converting multiple command prompt commands to a batch file

I just started with using batch files, my whole purpose of using them is to save the time I spend running the same commands(command line) and process (making moving folders)
Let me ask on a specific example for now:
I want to run this two commands in a single batch file
cd c:dir\..\dir\bin
prompt:
:WSDL.bat -o C:\somepatch\..\dir -uri someURL.xml
now instead of writing this three commands individually , I want them written on a single batch file , which would run every time the batch file is run.
I tried bunch of things ,but didn't really work out

SQLite in AppleScript?

I have a Windows app called via Shell from MS Word that reads and writes to Sqlite. I'm porting it to Mac. On windows I have a batch file:
SQLite3.exe pathtodb\databasename <sqlitecommands.txt
This batch calls the Sqlite command line program, attachs the database, and reads the command from sqlitecommands.txt. The sqlitecommands is dynamically modified(by Word VBA) to read (Select) Write (Update) to/from the database.
What is the format of an applescript to do the same thing in Mac OSX?
The following AppleScript creates a one-line shell script with sqlite syntax and executes it:
set sql to "sqlite3 ~/desktop/test.db 'insert into \"test\" values(\"hello world\",\"666\");'"
do shell script sql
You can use this example to create your own scripts dynamically.

Using vssadmin through a batch command or powershell

I need to access a file that is open by another process all the time. The best way would be for me to use Windows Shadow Copy to create another copy of the file and then use the copied file.
Does anyone know how to use vssadmin to create a backup and extract a specific file through a batch command or power shell? I would like to automate the process to run every night.
Jason
Here is a page with examples on how to create snapshots from a command line with vssadmin:
http://blogs.msdn.com/b/adioltean/archive/2004/12/14/301868.aspx

Resources