1.

Solve : Batch File to search a word and replace with another in same line?

Answer»

Hi All,

I am looking for a batch file to search a WORD start with abc_ and REPLACE with the whole word with another word in same line.


For Ex:

#define PNG file type icon abc_029_x200_y200 s_pnot0w12h8
#define PNG file type icon msn_549_x547_y540 s_pnot1w12h8
#define PNG file type icon ijk_469_x497_y569 s_pnot2w12h8
#define PNG file type icon rst_712_x492_y478 s_pnot3w12h8


Out put to be:

#define PNG file 029 icon abc_029_x200_y200 s_pnot0w12h8
#define PNG file 549 icon msn_549_x547_y540 s_pnot1w12h8
#define PNG file 469 icon ijk_469_x497_y569 s_pnot2w12h8
#define PNG file 712 icon rst_712_x492_y478 s_pnot3w12h8

In the output, word "type" is replaced with value "abc_029_x200_y200" and removes the character other than 029.


LIKE this i have 100's of textfile with 100s of line. Pls help me to do this task using batch file.
Very similar to your previous request. You should be able to take the examples you were already given and TWEAK them for this example.Quote from: chandru630 on January 25, 2014, 10:26:31 PM

I am looking for a batch file

Is there a reason why you didn't follow up your previous thread?

It's polite to say "yes it worked" or "It didn't work because it did [this] instead"



Discussion

No Comment Found