Hi all
I need to make a script that can search for a substring in a text-file (notes.ini file) and replace it with another string. The string must not be case sensitive. I have found this script here that works, but its case sensitive.
Dim struser, notesini
Set FSO=CreateObject("Scripting.FileSystemObject"
Set WshNetwork = WScript.CreateObject("WScript.Network"
Struser = WshNetwork.username
notesini = "C:\Documents and Settings\" & struser & "\Application Data\Notes\notes.ini"
Set TF=FSO.OpenTextFile(notesini,1)
inp=TF.ReadAll
out1=Replace(inp,"NAMES=Names.nsf","NAMES=C:\Documents and Settings\"+struser+"\Application Data\Notes\Names.nsf"
TF.close
Set TF=FSO.CreateTextFile(notesini,True)
TF.Writeline out
TF.Close
Regards
Jens
I need to make a script that can search for a substring in a text-file (notes.ini file) and replace it with another string. The string must not be case sensitive. I have found this script here that works, but its case sensitive.
Dim struser, notesini
Set FSO=CreateObject("Scripting.FileSystemObject"
Set WshNetwork = WScript.CreateObject("WScript.Network"
Struser = WshNetwork.username
notesini = "C:\Documents and Settings\" & struser & "\Application Data\Notes\notes.ini"
Set TF=FSO.OpenTextFile(notesini,1)
inp=TF.ReadAll
out1=Replace(inp,"NAMES=Names.nsf","NAMES=C:\Documents and Settings\"+struser+"\Application Data\Notes\Names.nsf"
TF.close
Set TF=FSO.CreateTextFile(notesini,True)
TF.Writeline out
TF.Close
Regards
Jens