Convert MS Word Files to Other formats using Abiword

August 31, 2005
Abiword is a word processor which can be used as an alternative to popular commercial counterparts. It comes installed by default on most Linux distributions.

Did you know that you can convert from one file type to another in the command line using Abiword ?

This is how it is done.

It is assumed that you already have Abiword installed in your Linux machine. If not, you can install Abiword using the package manager of your Linux distribution.

First open a terminal of your choice and move to the directory that contain MS Word files you wish to convert to open formats.

Next you can execute the commands shown below. Replace 'myfile.doc' with the filename of your MS Word document.

Convert MS Word files to Abiword format

$ abiword --to=abw myfile.doc

The above command converts the 'myfile.doc' MS Word file into a new file of abiword format by the same name - 'myfile.abw'.

If you want the file to be of different name, do the following:

$ abiword --to=myotherfile.abw myfile.doc

Convert an MS Word DOC file to SXW file format

To convert a doc file to format (sxw) do the following from the command line.

$ abiword --to=sxw myfile.doc

... You get the drift ?? You can use the above steps to convert to/from any format supported by abiword.

Batch Convert MS Word Documents

And if you want to convert a directory full of MSWord documents to abiword or some other format, you can use the following simple script.

for i in * ; do abiword --to=sxw $i ; done

This would convert all documents in the current directory into format.


  • Alex

    I noticed one tool at the Inet, which solved out my long-standing trouble and probably will help in any issue also - microsoft word recovery tool.