Add this code to a standard codemodule in the .xlsm file, and set a reference to MS Scripting Runtime. Save the workbook in the folder with all the html files to be renamed prior to running the macro. Of course, change SOMETEXT to the actual text that you have - if it isn't the same for all files, delete the first Name line and uncomment the second.
Sub RenameFiles()
Dim objShell As Object
Dim objFolder As Object
Dim objFile As Object
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(ThisWorkbook.path)
For Each objFile In objFolder.Items
If objFile.Name Like "*.html" Then
Name objFile.Name As Replace( Replace( objFile.Name, "SOMETEXT", ""), ".html", "_Live.html")
'Name objFile.Name As Replace( objFile.Name, ".html", "_Live.html")
End If
Next objFile
End Sub
Bookmarks