|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 144
Karma: 155110
Join Date: Nov 2010
Location: Ashford, Kent, England
Device: Kobo Clara, Kobo Touch, Kindle, Nook Touch
|
![]()
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 |
![]() |
![]() |
![]() |
#2 |
hopeless n00b
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
|
I don't think calibre-portable.exe supports command line arguments.
Two options.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 144
Karma: 155110
Join Date: Nov 2010
Location: Ashford, Kent, England
Device: Kobo Clara, Kobo Touch, Kindle, Nook Touch
|
![]()
Hello, ilovejedd:
Thanks for the reply - regarding your second suggestion: Before I go through all of the code, does this mean "use Normal Calibre" and make it think it's portable or does one use this on Calibre Portable? Sparky |
![]() |
![]() |
![]() |
#4 |
hopeless n00b
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
|
Once upon a time, Calibre Portable did not exist so people created and used the batch file to make normal Calibre portable. You can use the batch file with Calibre Portable's directory structure, though, with some minor modifications (need to fix the paths).
The folder "\Calibre Portable\Calibre" already contains the normal 32-bit Windows Calibre install. It's calibre-portable.exe that handles all the portabilization. |
![]() |
![]() |
![]() |
#5 | ||
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,681
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
![]() IIRC Calibre portable will start with the last library used. Quote:
BR Last edited by BetterRed; 04-20-2019 at 05:27 PM. |
||
![]() |
![]() |
Advert | |
|
![]() |
#6 | |||
hopeless n00b
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
|
Quote:
For example you have: Quote:
Quote:
|
|||
![]() |
![]() |
![]() |
#7 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,681
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@TheArtfulDodger - you might want to have a look into the following thread, if you haven't already ==>> Passing tray cmd line arguments to Calibre PA
BR |
![]() |
![]() |
![]() |
#8 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,681
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
![]() And it is the OS/File system that would be unable to find a symlink target, not calibre. You get a "No library found" message if a physical library disappears, or if a library symlink itself disappears, or if a library symlink target disappears. A feature of symlinks is that the vast majority of applications don't need to be aware that such a thing even exists. BR |
|
![]() |
![]() |
![]() |
#9 | |||
hopeless n00b
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
|
Quote:
To make it a bit clearer, assuming you've added these three libraries in the following locations to Calibre Portable: Calibre Library, Calibre Library 2 and My Main Calibre Library Quote:
Quote:
Mind, calibre-portable kinda does know about Q: and X:. The settings store absolute library paths but if the path doesn't exist, as long as the library is in the top level Calibre Portable directory (same location as calibre-portable.exe), calibre-portable can fix the path. I've encountered occasions where where if the original absolute path still exists, it will open that one instead of the copy in the new location. e.g. If you mirror C:\Calibre Portable to Z:\Calibre Portable and run Z:\Calibre Portable\calibre-portable.exe without deleting the original folder in C:, the last opened library is usually resolved (Z: copy) but if you switch to other libraries, it would open the C: copy. |
|||
![]() |
![]() |
![]() |
#10 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 144
Karma: 155110
Join Date: Nov 2010
Location: Ashford, Kent, England
Device: Kobo Clara, Kobo Touch, Kindle, Nook Touch
|
![]()
Hello, All:
I wanted to thank all of you for the help you provided! It took me a while but finally I took the time to learn about SymLinks (I'd never heard of them until ilovejedd mentioned them above - and I've worked with Windows for a long time - in fact I can remember (just) Windows 3.1!) and they are magic even though they are quite simple once they are understood! I must add that I had heard of shortcuts and I use them quite a bit! Anyway, I completely misunderstood the statement that, for Calibre to 'remember' the last library used, the library had to be in the Calibre Portable folder. From the above you can see that all of the libraries reside on the same drive and I thought that was enough. Now, however, thanks to SymLinks, they do all reside in the right place. Again, many thanks for the magic help! Sparky |
![]() |
![]() |
![]() |
#11 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,681
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
IIRC MS symbolic links first surfaced in NT 4, but for some reason MS hid them in XP (there were 3rd party shims that would 'unhide' them), they were exposed in Vista.
Data General and Digital Equipment proprietary OSs supported symlinks in the early 1970s. BR |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Passing tray cmd line arguments to Calibre PA | stisev | Calibre | 5 | 02-24-2019 07:29 AM |
command line batch to change title etc. | boell | Library Management | 6 | 10-14-2012 06:42 PM |
[Old Thread] Calibre Command line and .bat file | stratman | Calibre | 15 | 01-10-2012 05:38 PM |
Command Line Batch Adding of Epubs | nkormanik | Calibre | 6 | 10-19-2010 08:04 AM |
adding books via command line in msdos batch | FlaKate | Calibre | 1 | 12-25-2009 01:12 AM |