Only outputting changed lines to new file

Tool for Search and Replace across multiple files.
Post Reply
marmartim
Posts: 2
Joined: Sat Mar 05, 2016 2:34 pm

Only outputting changed lines to new file

Post by marmartim »

I'm finding TextCrawler to be a great tool, but I'm struggling to get it to do what I'd like, but I don't know if it is possible.

I want to be able to find and replace lines in a large .txt file with other values and output it to a new file, but I would then like it to find other lines and output those as changes to the new file, while leaving the previous changes in the new file, and not overwriting them.
For clarity, say I have:

Code: Select all

4
4
5
5
9
9
And I want to find and replace 5s with 500s and replace 9s with 900s, I'd want a new file after both of these commands to be processed to look like:

Code: Select all

4
4
500
500
900
900
Is this feasible in TextCrawler? I've tried experimenting with batch scripts but to no avail.
If anybody has any suggestions that would be fantastic.
marmartim
Posts: 2
Joined: Sat Mar 05, 2016 2:34 pm

Re: Only outputting changed lines to new file

Post by marmartim »

I've since found a solution after reading a forum post, and a little bit of twiddling.
If anybody is interested; I used the Batch Editor and created a text file which contained a list of the strings I wished to find and replace, and used that as a reference to replace what I wanted.
Post Reply