Copie o seguinte código e crie como script powershell nomeando o arquivo com a extensão .ps1 (testado ok com o powershell 4 no Windows 7 - verifique sua versão do powershell com "get-host | Select-Object version" ou "$ PSVersionTable. PSVersion ")
$word_app = New-Object -ComObject Word.Application <# New word application #>
$source = 'C:\recoveredDocs' <# create the source variable #>
$destination = 'C:\renamedDocs' <# create the destination variable #>
if (!(Test-Path -path $destination)) { <# check to see if destination folder exists #>
New-Item -path $destination\ -type directory -Force } <# create destination folder if it doesn't already exist #>
echo 'checking files to convert...'
<# filter for word .doc files only #>
Get-ChildItem -Path $source -Filter *.doc? | ForEach-Object {
if (!(Test-Path "$destination\$($_.BaseName).doc")) { <# check to see if file is already in destination folder (Note. "!" is a PS Alias for "-Not") #>
$document = $word_app.Documents.Open($_.FullName) <# open word document #>
$pattern = '[^a-zA-Z1234567890 ]' <# create regex pattern of allowed characters #>
$textstring = $document.range().text <# get the text string from the document #>
$titlestring = $textstring -replace $pattern, '' <# apply the regex pattern to eliminate the reserved characters #>
$title = $titlestring.substring(0, [System.Math]::Min(10, $titlestring.Length)) <# limit the string to 10 characters #>
$doc_strNewName = "$destination\$($title).doc" <# create the new name and path for the doc #>
echo "$($_.FullName) converted to $doc_strNewName"
$document.SaveAs([ref] $doc_strNewName, [ref] 0) <# save the document with new name and path #>
$document.Close() <# close documnet #>
}
}
echo "No More Files to Convert"
$word_app.Quit() <# close the word application #>