Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi,
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?

![]() |
JSP alert
|
Marco button, Copy and pa...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |