The linux `file` command tests files for file content, and does not look at the file extension. It will correctly identify an RTF misnamed as a DOC.
You could use that command in Cygwin on Windows, or
... quickly googles ... awesome, gnuwin32 has a native windows binary here:
http://gnuwin32.sourceforge.net/packages/file.htm
Should be simple to write a batch script to test the output (e.g. "sample.doc: Rich Text Format data, version 1, ANSI") and if it matches RTF, then do a `ren sample.doc sample.rtf`.