Replace Chunk of Text in Multiple Files

Associate
Joined
23 Jun 2007
Posts
552
Location
South East
Howdy

I need some help.. I need to find and replace the same chunk of text on multiple lines in multiple ini files.

E.g.

One
Two
Three

Four
Five

I want to keep Four and Five and remove/replace the rest.

All of the files are in \directory\user\file.ini and I need to ammend them for every user.

Hopefully this makes sense. Any suggestions?

I've tried various find and replace programs but they only seem to do one line.

Thanks :o
 
Notepad++ and Dreamweaver have find and replace functions that will let perform that operation across all of those ini files.
 
Hopefully someone shall come along and offer a better alternative, but I've used Actual Search and Replace in the past to S&R multi lines.

http://www.divlocsoft.com/


Though if it's the exact same lines on each file, couldn't you just use notepad++ and do it three times, removing one line at a time?
 
Notepad++ and Dreamweaver have find and replace functions that will let perform that operation across all of those ini files.

Thanks :)

I've downloaded the CS5 trial and its worked well. I couldn't find and replace with a blank though. So I've just used a random word then replaced that with another F&R software I tried.
 
What do you guys mean when talking about multi-line? I think I'm on CS3 and it definitely lets me select multiple lines of html to replace with other lines of code, and or blank lines if I wanted to.

It doesn't work when your lines aren't consecutive, you just have to do a new S&R for each completely separate chunk/line.
 
It doesn't work when your lines aren't consecutive, you just have to do a new S&R for each completely separate chunk/line.

That's exactly what I mean. Whereas Actual S&R will find any chunk of text you want, regardless of how large or how many line breaks are in it.
 
Just double checked..

Its worked but my code didnt contain any blank lines. I'll see if it works with blank lines tomorrow when i'm in the office.
 
Back
Top Bottom