Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


Add text on a specific position in multiple files

2. Help
  • Jeroen

    Dear notepad-users,
    I am searching for a function or plugin with which I can add some textlines to multiple files. I have 100+ files each with the same specific line of text. After this line I need to add the same code snippet (of multiple lines).
    Can anyone help me, thanks in advance!


  • dail8859

    I would suggest using the "Find in Files" capability built into N++ (Shift+Ctrl+F). Just search for the text you are looking for, and replace it with the original text plus whatever you want to append to it. For example, search for:

    my specific text

    and replace it with

    my specific text\nmy multiline\ncode snippet

    You can set the directory that you want to run the Find/Replace on. This assumes that the files are in the same directory. Hope this helps.

    P.S. You may need to use \r\n instead of just \n if you want Window's line endings.

    Last edit: dail8859 2013-11-08