Option Explicit
Dim objFSO, objFolder, objFile, strNewName, strOldName
Dim strPath, strName
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("c:\test") 'set your folder
For Each objFile In objFolder.Files
' Check if file name ends with ".doc".
If (Right(LCase(objFile.Name), 4) = ".doc") Then
' Rename the file.
strOldName = objFile.Path
strPath = objFile.ParentFolder
strName = objFile.Name
' Change name by changing extension to ".docx"
strName = Left(strName, Len(strName) - 4) & ".docx"
strNewName = strPath & "\" & strName
' Rename the file.
Wscript.Echo strOldName & " : " & strNewName
' objFSO.MoveFile strOldName, strNewName
End If
Next
It should work in Win7. Was there some error or other problem?