How to search for a string everywhere (C: and D:) using Findstr?

Posted by amiregelz on Super User See other posts from Super User or by amiregelz
Published on 2012-11-18T16:06:28Z Indexed on 2012/11/18 17:06 UTC
Read the original article Hit count: 278

I have a text (.txt) file located somewhere on my PC that contains a bunch of data, including the following string:

Secret Username: ********* 
Secret Password: *********

How can I find this file from command-line, using Findstr?
I don't know if it's on C: drive or D: drive.

I tried various Findstr queries, such as:

findstr /s /m /n /i Secret Username C:
findstr /s /m /n /i Secret Username D:
findstr /s /m /n /i /c:"Secret Username"
findstr /s /m /n /r /i .*Secret Username.*

but couldn't find the file.

© Super User or respective owner

Related posts about command-line

Related posts about search