Is there a tool to do this. I've seen some Python/Java tools to automate OpenOffice but has anyone reliably scripted this to do more than one file, and recurse through a folder/directory tree with .doc files in it, placing the converted .txt and .html files next to the original file in its location.
|
feedback
|
Linux/UnixThere are two Unix tools I know of:
You could just use
Where Mac OS XYou can use the same tools, but you'll have to install them using, for example, Homebrew. To do this, enter in the Terminal:
And then:
| |||||||||
feedback
|
|
@slhck your solution almost works but the output is to the display / STDOUT with all the files concatenated together. I need individual .txt files as output. Reason is that we're not accounting for the filename in the output. To work around having to traverse a folder hierarchy If I use Windows search for *.doc and then copy the results to a folder to put them all in one folder flattened, then I can boot into Ubuntu and run the following. (I have a file/folder recursion piece of code somewhere which I will dig out and add to later if time.) But for now just flattening the file hierachy as above is good enough. By the way, catdoc works better than antiword because antiword complains some files aren't word docs, these tend to be .doc files with formatting and blocks of text organised as frames within the doc. catdoc seems to convert all of my docs.
| |||
|
feedback
|