Skip to content

Latest commit

 

History

History
100 lines (76 loc) · 3.76 KB

README.md

File metadata and controls

100 lines (76 loc) · 3.76 KB

Windows Grep logo

Windows Grep

CodeFactor .NET Core

Command line grep-like file search utility for Windows

Supports

- Basic and advanced file searching
- Regular Expressions
- Chained commands
- Filetype/Filepath/Filesize filtering
- Exports
- Mass replace and delete
- Ease of use: Runs from Command Line, Powershell, Windows Explorer or headless

INSTALLATION

  1. Visit the release tab (https://github.com/sLill/Windows-Grep/releases)
  2. Download and run WindowsGrepSetup.msi (This is the only file you need)

This will install Windows Grep in ProgramFilesx86, add "grep" to your system's PATH for command line use, and insert registry keys for context menu use within Windows Explorer directories.

USAGE

Right-click in File Explorer > Windows Grep

OR

Open cmd > "grep [command]"

REFERENCE

Recursive Search -r --recursive
Target Directory -d --directory=
Context Characters -c --context=
Limit n Results -n --results=
Suppress output -s --suppress
Ignore Line Breaks -b --ignore-breaks
Ignore Case -i --ignore-case
Target File -f --file=
Plain Text Search -F --fixed-strings
Regular Expression Search -G --basic-regexp
Filter Files by Type(s) [Inclusive] -t --filetype-filter=
Filter Files by Type(s) [Exclusive] -T --filetype-exclude-filter=
Filter Filepath(s) by Expression(s) [Inclusive] -p --path-filter=
Filter Filepath(s) by Expression(s) [Exclusive] -P --path-exclude-filter=
Filenames Only -k --filenames-only
FileSize Minimum -z --filesize-minimum=
FileSize Maximum -Z --filesize-maximum=
Write Output to File -w --write=
Replace Text -RX --replace=
Delete Files -DX --delete-files
File Hashes --hash= (0=SHA256, 1=MD5)

* See documentation for detailed command descriptions

Command Order
Order of flags and the search term is completely flexible


EXAMPLE COMMANDS

Recursive search.
-r Dug

Recursive search. ignore-case.
-r -i D[ui]g

Recursive search. txt and cs files only. Filter out bin and obj matches
-r Dug -t .txt;.cs -P bin;obj

Recursive search. show 100 characters around the match.
-r Dug -c 100

Recursive search. Filenames only. Additional search on results from first command for "Mike"
-r Dug -k | Mike

Match phone number
[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}

Recursive search. US zipcode expression. Filter out .dll matches. Limit results 10. Write output to .csv
-r \d{5}(-\d{4})? -T .dll -n 10 -w 'C:\output.csv'

For even more examples and detailed descriptions of each flag, visit the wiki