VBScript to Find and Replace
I have been using this script for some time now. I took inputs from some sites to create this VBScript. I have modified it to my needs. I want to share this and keep it gfor my reference for future use as well. I am searching for a text and replacing it with the User input of mail id. '----------------------------------------------------- 'Use the below function if you want it to run from commandline and take input from users. 'If WScript.Arguments.Count <> 2 then ' WScript.Echo "usage: Find_And_replace.vbs filename word_to_find replace_with " ' WScript.Quit 'end If MailID=InputBox("Please enter your E-Mail ID") sFind="abcxyz.com" Set oshell=CreateObject("Wscript.shell") prog=oshell.ExpandEnvironmentStrings("%ProgramFiles(x86)%") TargetFile= prog & "\App\config.ini" TempFile= prog & "\App\config1.ini" FindAndReplace TargetFile, sFind, MailID WScript.Echo "Operation Complet...