10-02-2021, 12:44 PM | #1 |
Fool
Posts: 411
Karma: 3557934
Join Date: Feb 2003
Device: Kindle: Voyage,PW1,KOA, Kobo: Clara Colour, Nook GLP, Pocketbook verse
|
Calibre CLI act oddly in Windows Batch
I've had an odd experience running the Calibre CLI in a bat file on Windows 10.
The file has three lines: 1. shut down running instances of Calibre ("calibre.exe --shutdown-running-calibre" 2. create a new catalog 3. restart Calibre in the tray ("calibre.exe --start-in-tray" ). The batch file works as expected but it doesn't terminate: the last command "calibre.exe --start-in-tray" runs and the window batch window stays open--the batch file never gets to the final line ("pause" or "exit"). It does this whether or not the "--start-in-tray" flag is present. As I said, this doesn't mess up what I'm trying to do, but it seems to be the wrong behavior for a bat file. Am I missing something? |
10-02-2021, 03:42 PM | #2 | |
Addict
Posts: 237
Karma: 291844
Join Date: Oct 2019
Device: Kobo Nia
|
You need to use the command "start" which will allow you to execute a program and then immediately exit the batch file leaving the program running.
Quote:
|
|
10-02-2021, 05:22 PM | #3 |
Fool
Posts: 411
Karma: 3557934
Join Date: Feb 2003
Device: Kindle: Voyage,PW1,KOA, Kobo: Clara Colour, Nook GLP, Pocketbook verse
|
Many thanks. You are of course correct that "Start" is the right way to do this.
I've never actually has to use "Start" before. In my experience, most programs open and pass execution to the next line without using it. For example, if I use the same method to open Chrome: "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" Chrome opens and the bat files continues on to the next line. I wonder why some programs stop the bat file from going on and some don't. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mangas batch compressing (Windows only) | farfeduc | Kindle Developer's Corner | 7 | 07-04-2013 05:37 PM |
Seriously thoughtful Windows act as solar panels! The futuristic green house. | Nexutix | Lounge | 1 | 04-18-2011 10:28 PM |
Windows batch file to test, debug and develop recipes | euleralves | Recipes | 8 | 04-01-2011 04:22 PM |
Crash while batch converting epubs under windows | AprilHare | Calibre | 3 | 04-26-2009 03:46 AM |