Home > other >  How to be able to find / replace whatever content is on a certain line in several pages when the con
How to be able to find / replace whatever content is on a certain line in several pages when the con

Time:09-17

I need a script, bat, or even done in NOTEPAD or MS Exel with a plugin or etc.

Let's say I have multiple pages opened in NOTEPAD or in a sub-folder in Windows.

As an example:

All the pages have 5 LINES each. -- NOTE: the LINE #: examples below represent what NOTEPAD tells me when I enabled the LINE feature -- like also what GITHUB does, it gives each line in a page a number. So the pages I am working on, don't really have LINE #: in the pages.

To make it easy to understand, let's say I have three (3) pages. And here are the contents of each page. NOTE: in reality, I have a few dozen pages I need to edit, but for this example, we'll stick to 3 pages.

PAGE 1:

LINE 1: Black
LINE 2: Blue
LINE 3: Yellow
LINE 4: Brown
LINE 5: Purple

PAGE 2:

LINE 1: Dog
LINE 2: Cat
LINE 3: Goldfish
LINE 4: Parrot
LINE 5: Horse

PAGE 3:

LINE 1: Roses
LINE 2: Iris
LINE 3: Gullies
LINE 4: Pandoras
LINE 5: Daisies

Now then, no matter the content in each line above, I want to be able to do the following.

I want to replace LINE 3 for all the above pages to say:

LINE 3: Carrot

And I want to do this in a mass way, so I don't have to view each page and edit it myself manually. In other words, be able to find/replace whatever content is on a certain line in the page.

Is this possible?

CodePudding user response:

Okay, I think I found a solution, I can do this with MS Excel. I followed the guide found here, did a test, and it worked.

I'd still be very interested if there is another way, like doing it with NOTEPAD or a batch file.

  • Related