jspade_69
asked on
Script to Replace Text in a file
Need a little help. I have a vbscript that will open up a file extension and change "Program Files" text to "Program Files (x86)". The problem is that if "Program Files (x86)" already exist in the file the script is apending and changing to "Program Files (x86) (x86)". Trying to find a way to have the script look for "Program Files (x86)" and if exist do nothing, but continue to change "Program Files" to "Program Files (x86)". Here is the script:
Thanks
Test.vbs
Thanks
Test.vbs
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks fibo...you're 1st suggestion worked like a champ....so simple yet so affective! By the way i originally tried the 2nd option before posting and it didn't work.
Thanks again
Thanks again
B-) Glad it worked and I could help. Thx for the grade and points!
May be there is something like Program Files\ and Program Files (x86)\?