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-2011, 04:10 AM   #1
kombinerka
Junior Member
kombinerka doesn't litterkombinerka doesn't litter
 
Posts: 7
Karma: 180
Join Date: Jan 2011
Device: none
Multiple conversion of files in .bat with calibre?

Hallo,
I study Workflow Administration and I got an assignment with my group to automate pdf and/or other formats to epub/mobi fomats and automate it on our server.

The thing is that we never learned to script so we dont even have a basic knowledge of the scripts that could help us. We looked for about 4 weeks now too find a good way to convert multiple files with a single script that we could run in a time interval of several minutes. Thanks to your forums we were able to find this script:
Quote:
start/wait ebook-convert filename.pdf filename.epub
However my question is: Is there a way to Convert multiple files with this script without the need to write each file name separetely?

If so could you tell me what I should do or atleast help me to find a way to learn how to do it?

with kind regards,
Konrad T.
kombinerka is offline   Reply With Quote
Old 01-27-2011, 04:16 AM   #2
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by kombinerka View Post
However my question is: Is there a way to Convert multiple files with this script without the need to write each file name separetely?
I have no doubt there is and someone with that knowledge will eventually help out. I just want you to understand the difficulty you will run into converting PDF files, please read this thread for more info.
DoctorOhh is online now   Reply With Quote
Advert
Old 01-27-2011, 04:21 AM   #3
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
I've had some success with a construct like this:
Code:
for %%i in (*.pdf) do start /wait ebook-convert %i %i.pdf
Granted, I've only tried that about twice for a handful of files.
Manichean is offline   Reply With Quote
Old 01-27-2011, 04:23 AM   #4
kombinerka
Junior Member
kombinerka doesn't litterkombinerka doesn't litter
 
Posts: 7
Karma: 180
Join Date: Jan 2011
Device: none
@dwanthny: Yes, thank you. im looking into RexExes already

@Manichean: Thanks ill try it in a sec

Last edited by kombinerka; 01-27-2011 at 04:30 AM.
kombinerka is offline   Reply With Quote
Old 01-27-2011, 04:31 AM   #5
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Manichean View Post
I've had some success with a construct like this:
Code:
for %%i in (*.pdf) do start /wait ebook-convert %i %i.pdf
Granted, I've only tried that about twice for a handful of files.
Is this for output equal ePub?

Last edited by Manichean; 01-27-2011 at 04:48 AM. Reason: (Sorry, hit the wrong button)
DoctorOhh is online now   Reply With Quote
Advert
Old 01-27-2011, 04:48 AM   #6
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by dwanthny View Post
Is this for output equal ePub?
Oops, I mistyped:
Code:
for %%i in (*.pdf) do start /wait ebook-convert "%i" "%i.epub"
This should work for whatever combination of input and output formats.
Manichean is offline   Reply With Quote
Old 01-27-2011, 04:51 AM   #7
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by kombinerka View Post
@dwanthny: Yes, thank you. im looking into RexExes already
I was really referring more to the first paragraph.

Quote:
PDF format is the worst choice of source formats to use with Calibre, and conversions can range from decent to quite awful. Read here for the official statement on Calibre's PDF support.
DoctorOhh is online now   Reply With Quote
Old 01-27-2011, 05:05 AM   #8
kombinerka
Junior Member
kombinerka doesn't litterkombinerka doesn't litter
 
Posts: 7
Karma: 180
Join Date: Jan 2011
Device: none
hmmm which format would you recommend instead of pdf?

and when I run that script I get the help msg back from Kovid instead of converted files back.
kombinerka is offline   Reply With Quote
Old 01-27-2011, 05:14 AM   #9
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by kombinerka View Post
hmmm which format would you recommend instead of pdf?
If you have control over the original files then saving those html or if using MS Word saving them as html filtered or web page filtered would be best. The filtered html will convert well to epubs.

What is the source of these files? If they start as doc files this thread explains how to do batch conversions from doc files to epubs with free tools. Specifically check out posts 23, 49 and 56.
DoctorOhh is online now   Reply With Quote
Old 01-27-2011, 05:24 AM   #10
kombinerka
Junior Member
kombinerka doesn't litterkombinerka doesn't litter
 
Posts: 7
Karma: 180
Join Date: Jan 2011
Device: none
unfortunately about a 1/3 of them (more than 1thousand files total) is in .pdf format the rest is in .doc/.docx

and thanks for the links helps a lot
kombinerka is offline   Reply With Quote
Old 01-27-2011, 06:06 AM   #11
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
DOC/DOCX is not supported. If you get an error message, paste that in here. That makes it way easier for us to see what's wrong...
Is the batch file working at all (are the conversions starting?)?
Manichean is offline   Reply With Quote
Old 01-27-2011, 06:10 AM   #12
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Manichean View Post
DOC/DOCX is not supported.
I pointed him to threads describing how to do batch conversions of doc files, so those should be easy. It's the PDF files that will cause the most trouble.
DoctorOhh is online now   Reply With Quote
Old 01-27-2011, 06:11 AM   #13
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by dwanthny View Post
I pointed him to threads describing how to do batch conversions of doc files, so those should be easy. It's the PDF files that will cause the most trouble.
Still, if he tries to run those by the batch I posted, he'll get errors.
Manichean is offline   Reply With Quote
Old 01-27-2011, 06:13 AM   #14
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Manichean View Post
Still, if he tries to run those by the batch I posted, he'll get errors.
True, let's hope he follows the batch files I pointed him to.
DoctorOhh is online now   Reply With Quote
Old 01-27-2011, 09:49 AM   #15
kombinerka
Junior Member
kombinerka doesn't litterkombinerka doesn't litter
 
Posts: 7
Karma: 180
Join Date: Jan 2011
Device: none
hallo again and sorry for the late answer ;p
so when I execute this command
Quote:
for %%i in (*.pdf) do start /wait ebook-convert "%i" "%i.epub"
I get the following message it's not an error or anything just a message that flashes by in a split second.


didnt try the .doc/.docx yet because ive lent out my hd with server out for today
kombinerka is offline   Reply With Quote
Reply

Tags
calibre pdf epub


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Old Thread] calibre not creating content.opf or toc.ncx files during conversion foxxywith2xs Calibre 7 12-16-2012 07:49 PM
[Old Thread] Calibre Command line and .bat file stratman Calibre 15 01-10-2012 05:38 PM
Multiple Calibre Files? Sydney's Mom Calibre 21 05-02-2010 10:42 AM
Epub To RB Conversion Problem - Files From Both Calibre and Nuevomedia Brandon202000 Calibre 2 03-25-2010 12:42 PM
Epub To RB Conversion Problem - Files From Both Calibre and Nuevomedia Brandon202000 Calibre 0 01-15-2010 02:39 PM


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


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