The following Windows script demonstrates how to get the document Title. You'll want to create a file that ends with ".wsf" and paste this into it. Obvoiusly, you'll iterate over your files and rename them as you go. That's the easy part. This is the "hard" part and shown only how to get the Title.
I have CScript set as my default script engine. If you don't, you can run your script from the command line by:
CScript yourScriptName.wsf
You can make CScript the default engine by:
CScript //H:CScript
Once you've done that, your script will run merely by typing its name:
yourScriptName.wsf
You'll need DSOFile from Microsoft.
<package>
<job id="MyJob">
<?job error="true" debug="false" ?>
<script language="VBScript">
Option Explicit
'''
' Start of main program
'
Dim filename
Dim title
filename = "testfile.doc"
title = getTitle( filename )
WScript.Stdout.WriteLine title
WScript.Quit
' Needs DSOFile from http://www.microsoft.com/en-us/download/details.aspx?id=8422
Function getTitle( filename )
Dim objFile
Set objFile = CreateObject("DSOFile.OleDocumentProperties")
objFile.Open( filename )
getTitle = TrimEx(objFile.SummaryProperties.Title)
End Function
Function TrimEx(str)
Dim retval
Dim re
Set re = New RegExp
re.Pattern = "^\s*"
re.Multiline = False
retval = re.Replace(str, "")
re.Pattern = "\s*$"
TrimEx = re.Replace(retval, "")
End Function
</script>
</job>
</package>