Batch Convert OpenOffice (ODT) to MS Word (DOC) files?

I have a directory full of OpenOffice.org odt files that I'd like to batch-convert to doc files. Is there an easy way to do this?

(bonus points if your answer uses OpenOffice and a Linux command-line)


Solution 1:

You can use BatchConv

BatchConv is a batch tool allowing conversion of a file list from and to any supported OpenOffice.org import/export file formats. This macro based wizard asks for a file list and the target directory and file format. It will then loop over the list and use Ooo import/export capabilities to process the documents.

Solution 2:

UnoConv can batch convert using the OpenOffice libraries from the commandline. I've never used it.

You can also use AbiWord from the command line like this:

for file in *.odt ; do abiword --to=doc "$file" ; done

I've done that successfully many times.

Solution 3:

It appears that Libre Office supports what you are trying to do using command line arguments like the following:

libreoffice --headless --convert-to doc *odt

I found this information from Batch convert .odt to .doc using LibreOffice at the gnuru.org site.

Solution 4:

Take a look at this link:

mso2ooo - Batch Convert Microsoft Office Documents to OpenOffice Documents and vice versa

This little program batch / mass convert Microsoft Office documents (*.doc, *.xls, and .ppt) to their OpenOffice equivalent (.odt, *.ods, and *.odp (aka OpenDocument Format)). The nice thing about this script is that it converts all documents specified in the input, including subdirectories. The result can be put in another directory, and it retains its original directory structure (the script takes care of keeping the relative path). Use it at your own risk!

Solution 5:

On the Mac you can use textutil (System tool):

textutil -convert docx file.odt makes a converted copy of file.odt as file.docx

These formats are supported from textutil: txt, rtf, rtfd, html, doc, docx, odt, wordml, webarchive

textutil -h for more information