Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 01-27-2021, 05:37 AM   #1
billmandy
Member
billmandy began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Jan 2021
Device: Kindle
Calibre Bulk Convert Script

Hello.
I would like to create a BAT file for Calibre that would convert all of the specified file types (DOCX, TXT, DOC, RTF, EPUB, MOBI) from a specific director to MOBI/EPUB saved in a different director (if the file is already there, I want it replaced with the new version).
I did not manage to do this in bulk, only with a single file.

I am using the portable version of Calibre and I would like to use 2 directors placed in the Calibre main directory for input and output.
This is the my script for just one file:

C:\Users\Utl\Desktop\CalibrePortable\Calibre\ebook-convert.exe "C:\Users\Utl\Desktop\CalibrePortable\DOCX_INPUT\< some file name>.docx" "C:\Users\Utl\Desktop\CalibrePortable\Ebook_Output \<some file name>.docx.mobi"

Last edited by PeterT; 01-27-2021 at 11:07 AM.
billmandy is offline   Reply With Quote
Old 01-27-2021, 05:47 AM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,758
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Sorry, but nobody is going to help you convert copyrighted eBooks that you illegally downloaded from the Internet. You will have to look for help elsewhere.

I can tell by the filename that this eBook is not legit.
JSWolf is offline   Reply With Quote
Advert
Old 01-27-2021, 11:10 AM   #3
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,525
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
See if https://www.mobileread.com/forums/sh...96&postcount=7 helps
PeterT is offline   Reply With Quote
Old 01-28-2021, 02:45 AM   #4
billmandy
Member
billmandy began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Jan 2021
Device: Kindle
Quote:
Originally Posted by JSWolf View Post
Sorry, but nobody is going to help you convert copyrighted eBooks that you illegally downloaded from the Internet. You will have to look for help elsewhere.

I can tell by the filename that this eBook is not legit.

Whoooo, dude, you sir are a real lifesaver.
You have showed me the error of my ways and today, right here, right now, I am cured, I am a new man. And it is all thanks to you and your infinite wisdom. From now on, my way on life depends on the answers that you will give to me on this topic. I already added your answer to a docx file and I am eager to convert it into a epub.
Thank you a kazilion times kind sir, because of you I have understood how wrong was what I was doing and turned myself in to the FBI. Grettings from prison!
Please kind sir, please, provide me with more wisdom!

My new script:
C:\Users\Utl\Desktop\CalibrePortable\Calibre\ebook-convert.exe "C:\Users\Utl\Desktop\CalibrePortable\DOCX_INPUT\J SWolfUsselesAnswer.docx" "C:\Users\Utl\Desktop\CalibrePortable\Ebook_Ou tput \<some file name>JSWolfUsselesAnswer.mobi"

@PeterT
Thank you, I will see if I can use the information from your link.
billmandy is offline   Reply With Quote
Old 01-28-2021, 06:53 AM   #5
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,758
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by PeterT View Post
URL deleted
Why did you help someone sort out his illegally pirated eBooks? We don't do that on MR.
JSWolf is offline   Reply With Quote
Advert
Old 01-28-2021, 08:27 AM   #6
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,572
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Moderator Notice
You are not the decider Jon. Report what you feel needs reporting and keep your armchair moderating to yourself.
DiapDealer is offline   Reply With Quote
Old 02-14-2021, 10:21 AM   #7
billmandy
Member
billmandy began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Jan 2021
Device: Kindle
Quote:
Originally Posted by PeterT View Post
Wow... that was easy. Thank you.


For the batch file:

for /r %%1 in (*.epub) do "C:\Users\Util\Desktop\New folder\CalibrePortableNEW\Calibre\ebook-convert.exe" "%%~dpn1.epub" "%%~dpn1.mobi"

All you need is to specify the extension of the file to be converted, the path to ebook-convert.exe (in my case, C:\CalibrePortable\Calibre\ebook-convert.exe), the extension of the file to be converted (again), and the output extension, mobi in this case.

Last edited by billmandy; 02-14-2021 at 10:26 AM.
billmandy is offline   Reply With Quote
Old 02-14-2021, 10:31 AM   #8
billmandy
Member
billmandy began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Jan 2021
Device: Kindle
Quote:
Originally Posted by PeterT View Post
Wow... that was easy. Thank you.


For the bulk convert batch file:

for /r %%1 in (*.epub) do "C:\CalibrePortable\Calibre\ebook-convert.exe" "%%~dpn1.epub" "%%~dpn1.mobi"

All you need is to specify the extension of the file to be converted,

the path to ebook-convert.exe (in my case, C:\CalibrePortable\Calibre\ebook-convert.exe),

the extension of the file to be converted (again),

and the output extension, mobi in this case.

The batch file must be in the same folder as the files that you want to convert. The batch file can contain the same line multiple times, but for different output or input types of file.
Be careful.
If you have other ebooks or folders with ebooks in the folder that contains the script, the script will convert all of files that match the target input.
billmandy is offline   Reply With Quote
Old 02-14-2021, 01:05 PM   #9
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,758
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Why do you want Mobi when KF8 (AZW3) is better?
JSWolf is offline   Reply With Quote
Old 02-14-2021, 11:41 PM   #10
billmandy
Member
billmandy began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Jan 2021
Device: Kindle
Why AZW3?
I use a 2019 Paperwhite. Why AZW3 instead in of MOBI?
billmandy is offline   Reply With Quote
Old 02-15-2021, 12:37 AM   #11
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,220
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by billmandy View Post
Why AZW3?
I use a 2019 Paperwhite. Why AZW3 instead in of MOBI?
Because azw3 is a newer format that offer more formatting options? Trivial items such as being able to specify image widths in percent instead of being forced to use pixels. Mobi is a old format dating back to 2000. Amazon made some small changes after purchasing Mobipocket but that development pretty much died in 2011 when Amazon moved to AZW3 as their primary format.

About the only advantage of a .mobi file is being able to email it to your Kindle.

BTW, where did you get a 2019 Paperwhite? The last version of the Paperwhite I am aware of was the Paperwhite 4 introduced in 2018.
DNSB is offline   Reply With Quote
Old 02-15-2021, 03:29 AM   #12
billmandy
Member
billmandy began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Jan 2021
Device: Kindle
You are right. It is a 2018 edition. There is no 2019 Paperwhite.

I do not edit the ebook file, the epub/mobi. All of the text editing and formating I do it in Word, after that I convert the docx file to a reader friendly format.
It would be best to go from docs to azw3?
billmandy is offline   Reply With Quote
Old 02-15-2021, 03:32 AM   #13
billmandy
Member
billmandy began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Jan 2021
Device: Kindle
It is a 2018 Paperwhite, my mistake.

So it would be best to convert the docx into a azw3?
billmandy is offline   Reply With Quote
Old 02-15-2021, 10:42 AM   #14
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,758
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by billmandy View Post
It is a 2018 Paperwhite, my mistake.

So it would be best to convert the docx into a azw3?
Yes. Also, you can side load fonts that you want to use. You can use the fonts of your choice with KF8 but not with Mobi. Also, you can edit KF8 with the Calibre editor if you find something that needs to be fixed. You cannot edit Mobi.
JSWolf is offline   Reply With Quote
Old 02-15-2021, 11:24 AM   #15
billmandy
Member
billmandy began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Jan 2021
Device: Kindle
What do you mean by side loading fonts?

Thank you for the other details. I did not know that AZW is editable in Calibre.
billmandy is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
bulk reverse pages script? giannii Recipes 6 11-13-2013 12:46 PM
Error in Bulk Convert since I Upgraded to Calibre 0.8.30 Dasha Calibre 3 12-13-2011 03:09 PM
Perl script for ebook-convert gucky Calibre 3 01-11-2011 12:51 PM
Request Bulk Library load script efreese enTourage Archive 2 04-10-2010 11:38 AM
Bulk Pagerank Checker Script? SNaRe Lounge 2 10-22-2006 04:36 PM


All times are GMT -4. The time now is 05:56 PM.


MobileRead.com is a privately owned, operated and funded community.