replace text in file B from a variable in fil

November 24, 2009 at 13:39:04
Specs: Windows XP
I have 2 text file, A.txt and B.txt.
Some text (Bold) is veriable, and can be change any time.
file A.txt contain:
1. ----------------first line fixed.------.
---------- \\abcd\abcd\abcd\3061_2009-11-06_17-00-00_1.TXT----2nd fixed line----.
"\AB.CDEF02.1234" | 0 | Samar is R | 091106-111111 |--
veriable line starts with a space-----|

file B contains: (all fixed except WXYZ and WXYZ_0000000_111111):
<STARTFILE;
<ABCDEFGHIJ:KLMNOP=ALL;
/*
<abcdef:SOURCE FILE NAME=\AB.CDEF02.4389,DESTINATION
FILE
NAME=\\192.168.111.111\F$\abcde\XYZ\10SEP\AB.CDEF02.438
9
_165642,TRANSFER TYPE=FTP,FILE WRITING
MODE=NOOVERWRITE,COPY MODE=BINARY,RECORD LENGTH=1024;

<ABCDEFGHIJK;
<ENDFILE;

Now, I want to know to code to replace 4389 in file B, with 1234 from file A and
165642 in file B,
with 11111 from file A, randomly (If the contains of file A.txt changes, contains
of file B.txt should be changed.)


Variable in file A is in 3rd line and are 1234 and 165642

In file B, at 4th line text should be replace at the position of 4389 with 1234
and 165642 with 111111.
Please help me...


See More: replace text in file B from a variable in fil

Report •


#1
November 25, 2009 at 19:22:55
Hi,

anybody please help...........


Report •

#2
December 2, 2009 at 08:50:36
Is there anyone who can answer my question???

Report •

Related Solutions


Ask Question