View Single Post
Old 12-25-2009, 12:26 AM   #1
FlaKate
Junior Member
FlaKate began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Dec 2009
Device: none
adding books via command line in msdos batch

I am trying to write a dos batch file to add books to Calibre. I am using the calibredb add command. The command works fine when it is the only instruction in the batch file but when I add my other programming (for file management and checking) I get an error from the calibredb add command. The error is "The system cannot find the batch label specified - Sub". This appears after the "Notifying calibre of the change" message. My batch file is then ended without continuing to the next lines. Then when I try and call the batch file again nothing happens. I have to open a new command window to run any batch file. Does this have something to do with my OS being Vista? If so, any suggestions on how to fix this?

My second question is: I am trying to add several formats at the same time and I understand that I can use the calibredb list command to get the id of a book - how can I get the id of a particular book using the calibredb list command and then use the results in my dos batch? I would like to pass the resulting id to the calibredb add_format command.

I am soooo close to this working. Any help or examples you can provide will be greatly appreciated.

Thank you!
FlaKate is offline   Reply With Quote