Batch Converting OpenOffice.org Files

  2007-10-09


There’s a handy utility called unoconv that lets you batch/mass convert OpenOffice.org files to any format OpenOffice supports such as PDF, Word DOC, or HTML.

Here’s how to use it in Linux:

wget http://dag.wieers.com/home-made/unoconv/unoconv-0.3.tar.bz2
tar xjf unoconv-0.3.tar.bz2
cd unoconv
./unoconv --listener &
echo $! > unoconv.pid
# To convert all ODT files in ~/Documents to Word DOC format:
./unoconv -f doc ~/Documents/School/*.odt
kill `cat unoconv.pid`
rm unoconv.pid

The two important commands are:

  • unoconv --listener –to start the listener
  • unoconv -f <em>format path/to/odt/documents</em> –to actually convert files