I wanted a free grep tool for Windows that allowed you to right click on a folder and do a regex search of every file - without any nag screen.
The following is a quick solution based on the findstr mentioned in a previous post.
Create a text file somewhere on your hard drive where you keep long lived tools. Rename to .bat or .cmd and paste the following into it:
@echo off
set /p term="Search term> "
del %temp%\grepresult.txt
findstr /i /S /R /n /C:"%term%" "%~1\*.*" > "%temp%\grepresult.txt"
start notepad "%temp%\grepresult.txt"
Then browse to the SendTo folder. On Windows 7 browse to %APPDATA%\Microsoft\Windows\SendTo and drag a shortcut of the batch file to that SendTo folder.
I renamed the shortcut to 1 GREP to keep it at the top of the SendTo list.
Things that I'd like to do next with this is pipe the output of findstr through something that would generate an html file so that you could click on each output line to open that file. Also, I don't think it works with shortcuts to folders. I'd have to inspect the parameter and see if it contains ".lnk".
Well, beside the Windows port of the GNU grep at:
http://gnuwin32.sourceforge.net/
there's also Borland's grep (very similar to GNU one) available in the freeware Borland's Free C++ Compiler (it's a freeware with command line tools).
I wanted a free grep tool for Windows that allowed you to right click on a folder and do a regex search of every file - without any nag screen.
The following is a quick solution based on the
findstr
mentioned in a previous post.Create a text file somewhere on your hard drive where you keep long lived tools. Rename to .bat or .cmd and paste the following into it:
Then browse to the SendTo folder. On Windows 7 browse to
%APPDATA%\Microsoft\Windows\SendTo
and drag a shortcut of the batch file to that SendTo folder.I renamed the shortcut to
1 GREP
to keep it at the top of the SendTo list.Things that I'd like to do next with this is pipe the output of
findstr
through something that would generate an html file so that you could click on each output line to open that file. Also, I don't think it works with shortcuts to folders. I'd have to inspect the parameter and see if it contains ".lnk".ack works well on Windows (if you've got Perl). I find it better than grep for many uses.
GREP for Windows
I've been using it forever and luckily it's still available. It's super fast and very small.