Converting multiple files to different formats

LibreOfficeI needed to convert a collection of .doc files into .pdf. I didn't want to open them one at a time, so this article describes how to convert them using a Terminal Session. Note that for this article I was using Mac OSX 10.12.6 with Libreoffice 5.2.


Quit LibreOffice

Make sure that LibreOffice is not running before running soffice commands from the Terminal.

 

Terminal

We will start by opening a Terminal Session.

  1. Go to Applications > Utilities > Terminal.
  2. Change directory to the directory where your .doc files are stored.
  3. Run the following command:
/Applications/LibreOffice.app/Contents/MacOS/soffice --headless --convert-to pdf *.doc

 

Thanks for visiting.