Microsoft Office 2007 and 2010 include a tool that can convert .doc-files to .docx-files from the command line.
This will not get rid of the compatibility-mode message -- that requires opening the file and saving it as a new format -- but it does help with reducing file sizes and cross-platform compatibilities.
The tool is called Wordconv.exe
and is located in the root Office folder,
e.g. Office14
.