Does anyone know a quick and easy way to use Notepad++'s "find in files" (or other feature) to find files that do not contain a string?
For example:
List all files in c:\inetpub\mywebsite that do not contain "footer.asp"
feedback
|
This question came from our site for professional and enthusiast programmers.
|
You could always use the good old DOS / Command prompt and do something like this:
This will give you a list of the number of times that the search term occurs in the files in the directory, the second find operation that the first is piped through makes it even more sexy by filtering out the results from the first that you aren't interested in. You might want to change the * . * to *.asp though if you are only hunting through ASP files and you are only interested in looking through ASP files. FIND doesn't work with recursing sub directories unfortunately but you could experiment with the slightly more complicated FINDSTR command if this doesn't do the trick. | |||
|
feedback
|
|
While it is a great tool, I don't think you can do this in Notepad++. This Python script will print out the filenames of any non-matches:
| |||
|
feedback
|
|
I would just open up all files in tabs and then use the "find in all open files"... feature... I do exactly this regularly! | |||
|
feedback
|
|
Load the cygwin bash shell:
Where | ||||
|
feedback
|
|
The entire capability of Notepad++ is encompassed within the set of community plugins that Notepad++ provides you access to. If you have a recent version of Notepad++, pull down the menu called "Plugins" and choose "Plugin Manager". Then, in that list of plugins you can browse through them all and try to find something close to what you need. I think the most important plugin to have is TextFX followed by the XML plugin. Also, in the Find dialogue of Notepad++ is a regular expression option. It would be an advanced topic, but its possible your answer lies there. | |||
|
feedback
|