How do I batch convert a lot of .doc file to .html?

I have some archive documents in .doc format, and I want to convert them to a searchable data base. I know that .pdf is searchable, but PC users seem to find .html documents more easily searchable ( I don't understand this).

How can I do this conversion, preferably as a batch conversion?


Solution 1:

Open terminal and navigate (cd) to the directory containing the .doc files and run the following:

for i in *.doc; do
textutil -convert html $i;
done

I am using zsh so not sure if that would execute right in default bash shell. However, you can always invoke zsh for this purpose by just typing zsh at the prompt and hitting enter. The textutil command line has many options and capabilities. Just type textutil to see the options or look up the manual pages.

Or:

textutil -convert html *.doc

That also does the trick in default shell settings from within the directory containing the .doc files.