Insert Text at tge beginning of found documents
-
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
-
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
-
Thanks, have used not the right words for the search here but it solves my problem.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login