Select text within batch file

February 18, 2009 at 08:12:54
Specs: Windows 2000 SP4

I have a text file that has hundreds of lines of text. I need to create a batch file that reads all the lines in the text and then switches the 2 lines around.

So i have Text A and Text B in this file called peters.txt that has many lines of text. I want to put Text B in place of Text A and Text A in place of Text B.

The example text i want it to search for are the lines below:

0PW222222PeterPiper PIP Peterpan, Panland

0PW222222PeterPaner PAN Peterpan, Panland

Once it has found the text in the file i want it to switch it in the same file like below so the second line is where the first line was and vice versa:

0PW222222PeterPaner PAN Peterpan, Panland

0PW222222PeterPiper PIP Peterpan, Panland

Can you help please?

See More: Select text within batch file

Report •

February 19, 2009 at 05:40:49
Hi, i need this urgently, can anyone help

Report •
Related Solutions

Ask Question