For Each file As String In FileSys.GetFiles(path)
If file.EndsWith(".xls") OrElse file.EndsWith(".xlsx") Then ‘如何将目录中含有扩展名为XLS或XLSX的文件统一命名为: 主文件名 & ".DOCX"
Dim filename As String = file & ".docx"
end if
如:目录有文件1.XLS、2.xlsx将其批量命名为:1.docx 2.docx