I'm sorting through a bunch of old writings & am running across a large number of files, which are exe's rather than doc or docx or txt or any other normal text doc format. I am almost positive that all of these writings were done in Microsoft Word for Mac (probably) 2004. There are gibberish characters at the header & footers but the body text has all seemed intact, from what I've glanced at. I am curious about how this might have happened, but my priority right now is just reconverting these files back to a simple text format. There are hundreds of documents, mostly notes, but some finished pieces and I would much prefer to not have to go in & remove the junk text from all of them by hand. So...what are my options? thx

  • 2
    An exe file is not a document to be converted. It's a program executable file; it's the actual program. Word for Mac saved in doc format just like Word for Windows. – Allan Jun 23 '16 at 2:32
  • I know what an exe is. And I know the contents of these files are text, words arranged sequentially to tell stories, not code. Somehow they were converted to EXEs and I need to change them back. – Kerlix Jun 23 '16 at 2:34
  • Open it in Word. If Word can't read it, then you have an unknown format and its impossible for anyone to guess it without seeing it. – Allan Jun 23 '16 at 2:38
  • Compressed self extracting exe files? – Rainer Jun 23 '16 at 11:51
  • 1
    Could you upload a representative file, to e.g. tinyupload.com, and provide the download URL, so we can get a better handle on your issue? That would be preferable however if not, then at the least, you need to run the following commands in a Terminal and add the output to your question. file filename where filename is the name of the file. In a Terminal type "file ", that's "file " followed by a space file , then drag & drop the file on the Terminal window and press enter. Then do, cat filename | head -c 8 | xxd -p. Continued in next comment... – user3439894 Jun 23 '16 at 14:36

The file you linked can be opened, for proper display, in LibreOffice, which by the way is free.

I was also able to convert this file via the command line to a plain text document using LibreOffice's executable soffice using the following syntax:

/Applications/LibreOffice.app/Contents/MacOS/soffice --headless --convert-to txt $FileNameToConvert


/Applications/LibreOffice.app/Contents/MacOS/soffice --headless --convert-to txt "'…& hitting number three on 3"

The above command created the "'…& hitting number three on 3.txt" file and I then opened it in TextEdit and it displayed properly as it should.

You can batch convert the documents in the same manner by using a wildcard (an asterisk), e.g..:

/Applications/LibreOffice.app/Contents/MacOS/soffice --headless --convert-to txt *

The above command to batch convert assumes you've installed LibreOffice in /Applications and placed the files to convert in their own directory and have changed to that directory in Terminal.

Note: If you want to convert the files to Microsoft Word documents use doc or docx instead of txt for the --convert-to option, e.g.: --convert-to doc

  • Update Note: The linked file is no longer available. From an archived copy I still have, based on the files signature in its header, it appears to be a AppleWorks 6 document. – user3439894 Dec 19 '17 at 5:18

The command line utility textutil can do the job. The basic syntax would be

textutil -convert txt -- filename

To batch process a group of files in a folder the syntax would be

textutil -convert txt -- /path/to/folder/*

textutil can convert both .doc and docx files among other file formats.

  • Well, what's weird is Terminal tells me Done, that it's worked, but the files I've tried converting are still exe's and full of gobbeldygook – Kerlix Jun 24 '16 at 0:15
  • OK, the files aren't MS word documents. Your sample file reveals the magic number BOBO which is an AppleWorks document. – fd0 Jun 24 '16 at 8:58

You must log in to answer this question.

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