“user3245549” is right:
All of the above answers with “for loops” and nested bat files are mumbo jumbo. All you need is to just use “findstr” – example:
C:\temp> findstr /S /C:"/work" * | more <-- this will find the string "/work" in any file
or
C:\temp> findstr /S /C:"/work" "*.*" | more
or
C:\temp> findstr /S /C:"/work" * > results.txt
or
C:\temp> findstr /S /C:"/work" "*.*" > results.txt
NOTE: You can leave out the “double-quotes” around the asterisks – I just put those because the editor here on Stackoverflow was stripping out the asterisks on either side of the period.
NOTE ALSO: You still need the quotes around the “string text” for which you are searching, as far as I know.