Hello AltNaMara
I'm sorry for the late response,
but here is a script which I hope does what you want.
If there are other questions, just ask.
I will do my best to answer it.
I have omitted the text file Totals.txt.
If you still want to have it, I can work something out.
Sweet
____________________
Const ForReading = 1
Set objFSO = CreateObject("Scripting.FileSystemObject")
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colFiles = objWMIService.ExecQuery _
("Associators of {Win32_Directory.Name='J:\VBS-Data_Analysis'} Where " _
& "ResultClass = CIM_DataFile")
For Each objFile In colFiles
If objFile.Extension = "html" Then
Set objFile = objFSO.OpenTextFile(objFile.Name, ForReading)
strContents = objFile.ReadAll
objFile.Close
strStartText = "<title>"
strEndText = "</title>"
intStart = InStr(strContents, strStartText)
intStart = intStart + Len(strStartText)
intEnd = InStr(strContents, strEndText)
intCharacters = intEnd - intStart
strCount = Mid(strContents, intStart, intCharacters)
MsgBox strCount
Message = "Please Enter New Title "
Text1 = "User input canceled "
Text2 = "You entered: " & vbCrLf
result = InputBox(Message)
If result = "" Then
MsgBox Text1
Else
MsgBox Text2 & result
End If
Set oFSo = CreateObject("Scripting.FileSystemObject")
Set sptF = oFSo.CreateTextFile("J:\VBS-Data_Analysis\" & result & ".html", True)
OstrNewText = Replace(strContents, strCount, Result)
sptF.WriteLine OstrNewText
sptF.Close
strText = strText & strCount & vbCrLf
End If : Next
____________________