Thread: doc to epub
View Single Post
Old 02-01-2010, 12:50 PM   #23
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
Laura,

No, what I'm suggesting is a single batch file that will both batch convert your .doc files to .html and then batch convert the .html files to .epub files.

As I noted, the batch file is two lines long:

Code:
for %%I in (*.doc) do "C:\Program Files (x86)\AbiWord\bin\AbiWord.exe" --to=html "%%I"
for %%I in (*.html) do "C:\Program Files (x86)\Calibre2\ebook-convert.exe" "%%I" "%%~nI.epub"
Here's what you need to do:

1. Download and install AbiWord. It's completely free.
2. Download and install calibre. It's completely free.
3. Copy and paste the two lines above into Notepad, and save a file named "doc2epub.bat" or anything else whose name you'll remember ending in .bat. Save it in the same folder where your .doc files are.

The lines assume you're using a 64-bit operating system. If not, then use this instead:

Code:
for %%I in (*.doc) do "C:\Program Files\AbiWord\bin\AbiWord.exe" --to=html "%%I"
for %%I in (*.html) do "C:\Program Files\Calibre2\ebook-convert.exe" "%%I" "%%~nI.epub"
The only difference is where the .exe files are located. You'll probably want to double check that the programs got installed in the same directories that mine were. I cannot test on a 32-bit version of windows, since I don't have access to one.


4. Navigate in Windows explorer to the folder where your .doc files are, and double click on "doc2epub".

The batch file will convert all the .doc files in the folder to html, and then convert all the .html files to .epub.

There's a lot of tweaking that can be done there to make the script better, especially with regard to how it handles filenames, metadata, etc., but it's hard for me to predict without knowing what your files are like. You might just want to cut and paste the FIRST line, and run that. That will batch convert your files to HTML. You then might want to use the graphical user interface in calibre to batch convert the HTML to ePub. That's really up to you.

Last edited by frabjous; 02-01-2010 at 12:57 PM.
frabjous is offline   Reply With Quote