When you click OK, it puts the list of directories listed in the "Directories to search" box in the top half of the window, in the Directories text box, separated by semicolons. Click "Folders and Groups" and you'll see a "Select Directories" (notice it's plural) dialog appear allowing you to add multiple directories. The second button is where the real flexibility comes in. The first one, Browse for Folder, allows you to select a single folder and when you click OK, it replaces the text in the Directories edit box with the result, making it easy to drill down through a folder tree and enter it correctly. To the right of the Directories edit box are two small buttons. This is a good starting point but if there are many folders to search through, it can not only take a while but large result sets can be overwhelming to comb through unchecking "Include subdirectories" may not be enough for you to find what you need if you can't remember what folder your source is or if you want to compare how something was used in different projects.
When you pull up the Find in Files dialog and select the "Search in directories" option in the "Where" group, the Directories text box is enabled to allow you to specify a folder to search. Wouldn't it be nice if there was a way to fine-tune the folders being searched? If you have backups of your source or multiple projects with copied or similar sets of routines and check the "Include subdirectories" checkbox, the search results could contain a lot of duplicates taking extra time to wade through them all. So, although the case of filenames, beginning with the ! exclamation mark, must be rather rare, I think that using the | symbol to express the negation concept, in the Filters: zone, would have been a more appropriate symbol -))Īnd of course, an unique syntax |Test*.xml, beginning with the | symbol, would have implicitly meant the syntax *.* |Test*.You've probably used Delphi's Find in Files feature to search for an identifier or library function through multiple folders of source code. Note that the forbidden characters, in Microsoft filenames are the nine following symbols : Only the two, non-created files, !!Test.txt and !!Test_2.xml !!test*.xml => 0 files listed ( Logic as the inclusive filter is missing ) but incorrect because it should mean, either :Īll files except for the files !Test.txt and !Test_2.xml Only the two !Test.txt and !Test_2.xml files !test*.xml => 0 files listed ( Logic as the inclusive filter is missing ) but incorrect because it should mean, either :Īll files except for the files Test.txt and Test_2.xml Test*.xml => 2 files listed ( Correct : only the the two Test.txt, Test_2.xml files ) *.xml !!test*.xml => 11 files listed ( Correct : all but the two !Test.txt and !Test_2.xml files ) *.xml !test*.xml => 11 files listed ( Correct : all but the two Test.txt, Test_2.xml files )
*xml => 13 files listed in the Find result panel, not including the empty doLocalConf.xml file REPLACE $0 ( just in case I run the replacement by mistake ! ) Open the Find in Files dialog ( Ctrl + Shift + F ) So I created four test files Test.txt, Test_2.xml, !Test.txt and !Test_2.xml, from any non-empty xml file, in the folder of my local installation of N++ v7.8.2 : Note that this last point is wrong, since Notepad++ v7.8.7. it would have scanned all files, except for those with extension = log Note that you cannot just write an exclusive mask, alone ! For instance, the !*.log filter does not scan any file :-(( Personally, I think that !*.log should, implicitly, mean !*.log *.* i. For instance, if the scanned directory contains a file !Test_3.xml the mask !!Test*.* *.xml would scan all xml files whose name do not begin with !Test The excluding symbol ! is not a problem if, exceptionally, a filename begins with the ! character. For instance, !*.exe !*.log *.* would scan all files of the given directory ( and, possibly, its sub-dirs ), except for those with extension = exe and log The inclusive mask does not need to be the first item. If the Filters box is empty, it means *.* ( Trivial ! ) Additional points regarding the Filters entry box, of the Replace in Files dialog :