9

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)

6 Answers 6

4

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.

1
  • @Nate I wonder why you accepted this answer over frabjous' two solutions although you promised bonus points for a command line solution.
    – user829755
    Dec 9, 2015 at 22:34
5

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.

5

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.

3
  • 1
    I think this answer is better because many systems will have LibreOffice installed but not all will have Abiword or the other suggestions. Apr 6, 2017 at 23:28
  • I've noticed this seems to work in LibreOffice 5.2 (in Ubuntu 16.10 repos) but not 4.3 (in Debian Jessie repos). This is obviously a case of Debian Stable being rather outdated, but certainly a point of note for those on stable or LTS releases of other distros. Apr 11, 2017 at 5:08
  • 1
    To add to @StephenAngelico's observations: this answer worked perfectly for me on Ubuntu 16.04 LTS with LibO 5.4.0.3. My sense is that it's the best (as I type!) answer to an old, but still useful, question.
    – Dɑvïd
    Aug 2, 2017 at 12:21
1

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!

1

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

-2

Word 2010 (and possibly previous versions as well) can natively open OpenOffice (odt) files, right? If so, and you want a Windows method, simply run a command prompt, cd to the directory where the files exist, and execute the following command: ren *.odt *.doc

No conversion neccessarry, just a rename of the file extensions.

2
  • 1
    My copy of MS-Office Pro 2008 (Mac edition) cannot open ODT files. "Word cannot open this document. The document ... might not be a valid Word document."
    – Nate
    Oct 28, 2010 at 2:09
  • 2
    Even if this approach did work, the fact that you're just renaming the files means that Word is smart enough to figure out that the file your opening is an ODT, even though it's named as a DOC.
    – Matt
    Nov 14, 2013 at 18:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .