Microsoft File Explorer search functions are limited to a few file types. What other options are available?
MS File Explorer – Expanding it’s Limited Default Capabilities
By default 10 File Explorer will only search for text inside a limited set of file extensions (a.k.a. file types).
The new--Indexing Options feature in Windows Control Panel can be set to add search support of additional file extensions.
The default supported file types include TXT files, DOCX files, LOG files, XLSX files.
In a Windows Command prompt, the
findstr command searches the current directory (in this case C:\) and all subdirectories for the pattern “COMMIT” in any file with a .cs extension and outputs only the filename.
C:\>findstr /s /m "COMMIT" *.cs
Search Current Directory
Searchs the current path for
.bat files contain the string "
Select-String -Path "*.bat" -SimpleMatch -Pattern "Monthly" Select-String -Path "*.bat" "Monthly"
-SimpleMatch uses a simple match rather than a regular expression match.
In a simple match,
Select-Stringsearches the input for the text in the Pattern parameter. It doesn't interpret the value of the Pattern parameter as a regular expression statement.
Default search type is a regular expression search.
The PowerShell command below searches the current directory (in this case C:\) and all subdirectories for
.cs files containing text with the pattern "COMMIT" and lists the filenames.
PS C:\>Get-ChildItem -Path "*.cs" -Recurse | Select-String "COMMIT" -List | Select Path
Notepad++ is a widely used and well recommended, open source text editor. Notepad++ can be installed as a stand-alone .exe file. Notepad++ (notepad-plus-plus.org)
Syntax highlighting is supported OOTB for many languages.
Comparing two files. Diff type functions are available as plugins:
Plugins - includes a Plugin Admin to download and management plugins.
It’s Find in Files search function will search all files in given folders.
Notepad++ Find in Files
Search > Find in Files… (Ctrl + Shift + F)