Answer the question
In order to leave comments, you need to log in
How to find files with a certain number of repetitions in Notepad++?
Good afternoon. Tell me, how in a huge number of files to display only those that match the number of matches?
For example show all files where "keyword" is 10 or more.
Thank you.
Answer the question
In order to leave comments, you need to log in
In notepad++ itself, no way . This is easier to write yourself as a console utility (if a programmer). This is a simple recursive traversal of the folder tree and for each file, counting occurrences.
See the command cmd forfiles, it allows you to traverse the directory tree and execute the command you specify for each file.
The find command can count the number of occurrences.
The for command allows you to filter the output of the find command
. For example:
forfiles /p C:\Windows\System32\drivers\etc /m * /s /c "cmd /c for /f \"tokens=3 delims=:\" %a in ( 'find /c \"127\" @path') do @if %a GEQ 3 echo PaTh [%a]"
C:\Windows\System32\drivers\etc - the path from which we start looking
127 - the string we are looking for
3 - the number of line matches in the file from which we start to react.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question