Looking at the code, it is not clear what strForward contains.
But you have 2 search/replace things going on here, and I think the second one is causing the problem.
First time around, you replace
NUCLEAR=\ssmsilo191\ ...(hal9000)
by NUCLEAR=\ssmsilo191\secure access\ ...(hal9000)
but that means the string is now actually:
'NUCLEAR=\ssmsilo191\secure access\hal9000
then you replace strForward (which I am assuming holds
'NUCLEAR=\ssmsilo191\secure access)
by 'NUCLEAR=\ssmsilo191\secure access\sepi2100\
and that gives you 'NUCLEAR=\ssmsilo191\secure access\sepi2100\hal9000
Why not just find the row that says
NUCLEAR=\ssmsilo191\
and do the whole thing in one shot?
Alternatively, try reading the file in one line at a time, processing each line, and writing it back out a line at a time to a new file?
Enter your message below
Sign in or Join us (it's free).