Scan a file looking looking for multiple key words or phrases?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
SIMMS7400
Posts: 539
Joined: 07 Jan 2016 07:47

Scan a file looking looking for multiple key words or phrases?

#1 Post by SIMMS7400 » 15 Mar 2017 08:40

Hi Folks -

I was wondering if anyone could suggest an easy way in which I could scan a particular text file using multiple key words/phrases?

Thanks!

ShadowThief
Expert
Posts: 1160
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: Scan a file looking looking for multiple key words or phrases?

#2 Post by ShadowThief » 15 Mar 2017 08:47

findstr does this automatically if you don't use the /C flag.

Squashman
Expert
Posts: 4465
Joined: 23 Dec 2011 13:59

Re: Scan a file looking looking for multiple key words or phrases?

#3 Post by Squashman » 15 Mar 2017 08:51

I remember showing you how to use the /G option with FINDSTR in one of your previous questions.
viewtopic.php?f=3&t=7572&p=50365#p50343

SIMMS7400
Posts: 539
Joined: 07 Jan 2016 07:47

Re: Scan a file looking looking for multiple key words or phrases?

#4 Post by SIMMS7400 » 15 Mar 2017 10:50

Yes, thank you Squash! It's working great.

However, when using the /F: switich as well, is there a way to put put which file the search strings were found in? thanks!

Post Reply