digital-dawg,
This script will replace strings in all files with certain file types.
fengshui_1998
' Copy and save to ReplaceTxt.VBS script file
' -------------------------------------------------
'
' This script will replace text in all the file of file types .XXX
'
prompt = "Select file types to match" & vbcrlf & _
"Do not include '.'"
infile = InputBox(prompt,"Get Files"
findstr = InputBox("Enter string to find> ","Find String"

replstr = InputBox("Enter string to substitute> ","Substitute String"
If infile = "" or findstr = "" or replstr = "" then wscript.quit
Set fso = CreateObject("Scripting.FileSystemObject"

' Get current directory
path = ScriptPath()
Set fldr = fso.GetFolder(path)
Set filelist = fldr.Files
' num_files = filelist.count ' COUNT the number of files
For Each file in filelist
fname = file.ParentFolder & "\" & file.name
If TypeMatch( file.name, infile) Then
ret = FileTxtReplace(fname, findstr, replstr)
If ret <> 0 then msgbox "Warning: " & file.name
End If
Next
' *********************
Function ScriptPath()
' *********************
ScriptFullName = Wscript.ScriptFullName ' path & filename
ScriptFileName = Wscript.ScriptName ' just filename
intFile = Instr(ScriptFullName, ScriptFileName) ' Locate end of path
ScriptPath = Left(ScriptFullName, intFile - 1) ' Path includes "\"
End Function
' ********************************
Function TypeMatch(f1tmp, f2tmp)
' ********************************
If instrRev(f1tmp, "."

> 0 then
ftype = right(f1tmp, len(f1tmp) - instrRev(f1tmp, "."

)
if instr(1, ftype, f2tmp, 1) then
TypeMatch = True
else
TypeMatch = False
end if
Else
TypeMatch = False
End If
End Function
' ****************************************
Function FileTxtReplace(theFilename,findThis,replaceThis)
' ****************************************
Const ForReading = 1, ForWriting = 2
Dim fso, f, fileContents
Set fso = CreateObject("Scripting.FileSystemObject"

If not fso.FileExists(theFilename) then 'error trap for file doesn't exist
FileTxtReplace=53
Exit Function
End If
Set f = fso.GetFile(theFilename)
If f.size=0 then ' error. file is 0 bytes
FileTxtReplace=75
Exit Function
End If
Set f = fs

penTextFile(theFilename, ForReading)
fileContents= f.ReadAll
Set f = fs

penTextFile(theFilename, ForWriting, True)
f.Write Replace(fileContents, findThis, replaceThis,1,-1,1)
FileTxtReplace=0 'return ok error code
End Function