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
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
docx instead of
txt for the
--convert-to option, e.g.:
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.