I want to find out all the files which contain a keyword in a directory and all the subdirectories, and there are some .svn
directories, I should ingore these directories.
In Linux system, I can do it easily by:
grep -r keyword ./ --exclude-dir ".svn"
But when I turn to windows, findstr
is a substitute for grep
in windows, I try to do it like this:
findstr /s keyword ./*
The result will return with the .svn
directories, which is not what I want.
I read the TN Findstr, on microsoft website
/v : Prints only lines that do not contain a match.
But when I try it like below, It still doesn't work.
findstr /s keyword /v ".svn" ./*
I think there may be some problem with my usage of findstr
. Any help would be great, thanks in advance.
***************************** update1 *****************************
In fact, I am trying to use grep
in GVim
, it will call 'findstr`.