Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

findstr command to find a phrase instead of a single word [closed]

findstr /S "stored procedure" *.*

returns all the files with the string "stored" as opposed to "stored procedure".

Does anyone know what I am doing wrong? Thanks

like image 758
user1298925 Avatar asked May 24 '13 17:05

user1298925


1 Answers

You need to use the /c: option to tell findstr to search for the entire string not to search for individual components. Your command will find any file with "stored" or "procedure".

findstr /S /c:"stored procedure" *.*

Will find any files with the string "stored procedure" in them.

like image 191
shf301 Avatar answered Oct 02 '22 19:10

shf301