Find/copy specific line in all opened files
-
Let´s say that we have 75 files opened in notepad ++. There´s only in line in each of all these files that I´m interested in and it´s always the same line, line 74.
I´d like to copy every line 74 in all opened files to a new txt file, is this possible? I´ve tried macros but without any success.
If it´s easier, is it possible to search for line 74 in all opened files. If you search for anything and select “Find All in All Opened Documents” you´ll have the search results on the bottom of notepad ++. From there you can just copy the search result to an Excel file.
-
Hello, @markus-sulk and All,
Not difficult with regex !
So :
-
Open the Find dialog (
Ctrl + F) -
Untick all box options
-
SEARCH
(?-s)\A(.*\R){73}\K.*\R -
Select the
Regular expressionsearch mode -
Click on the
Find All in All Opened Documentsbutton
Et voilà !!
Notes :
-
If the
74thline is empty, it will output that empty line ! -
Any file, with less than
74lines, is not outputted, too !
Best Regards,
guy038
-
-
@guy038 , amazing!
That was just fantastic, made my day, and week!
Thanks alot! -
@guy038 Thank you
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