View Single Post
Old 04-20-2019, 10:25 AM   #1
TheArtfulDodger
Zealot
TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.
 
TheArtfulDodger's Avatar
 
Posts: 144
Karma: 155110
Join Date: Nov 2010
Location: Ashford, Kent, England
Device: Kobo Clara, Kobo Touch, Kindle, Nook Touch
Question Problems Starting Calibre with command-Line Arguments from Batch File

Hello, All:

I am trying to execute Calibre from a batch file so that I can use a command-line argument "--with-library <library name>". Here's my one-line batch file (StartCalibre.bat):

"Calibre Portable\calibre-portable" --with-library "My Main Calibre Library"

and the file structure:

Q:
|
+-- File: StartCalibre.bat
|
+-- Directory: Calibre Portable
| |
| +-- File Calibre-portable.exe
| +-- Directory Calibre Settings
| +-- Directory Calibre
| +-- Directory Calibre Library
|
+-- Directory: My Main Calibre Library
| |
| +-- Directory Book1
| |
| +-- Directory Bookn
|
+-- Directory: Other Libraries

Every time I execute this batch file in Command Prompt I get a Python function terminated unexpectedly [Error 5] Access is denied (Error Code: 1). If I execute it from an Admin Command Prompt, Calibre starts but ignores the --with-library part of the instruction.

Ultimately, I want to create a shortcut to the batch file and execute Calibre that way. When I attempt this ordinarily I get the Python error; when I execute it as admin, it simply does nothing!

I would appreciate any information any guidance any one could provide!

Sparky
TheArtfulDodger is offline   Reply With Quote