Community
    • Login

    Insert Text at tge beginning of found documents

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 205 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • digidaxD
      digidax
      last edited by

      Hi,
      I have here a document root of a webserver with around 1000 php files and > 4000 other files.
      Now I have to add in each php file at the beginning of the file a text line.

      So I would work with “search and replace in files”:
      Filter would be *.php
      Replace is: <?php require_once(“debugger.php”); ?>

      But I have nothing for what I can search for to replace it.
      How can I do the job?

      If not possible with notpad, I would write a bash script.

      Thanks, Frank

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @digidax
        last edited by

        @digidax

        I think the recent (from 2020) posts in this thread should get you going on your task: https://community.notepad-plus-plus.org/topic/11987/add-line-of-text-to-beginning-of-multiple-files

        digidaxD 1 Reply Last reply Reply Quote 1
        • digidaxD
          digidax @Alan Kilborn
          last edited by

          Thanks, have used not the right words for the search here but it solves my problem.

          1 Reply Last reply Reply Quote 2
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors