0

I need to search a hard drive for a file, but I don't know the name of the file. I only know that the file contains a list of email addresses. (I don't know which email addresses are on the file, I just know that there is a list of email addresses) The file is not necessarily a Word or .txt document. Is there any way that I can find this file? Thanks for the help!

(I have a Windows computer)

  • 1
    Related: http://superuser.com/questions/60173/how-to-search-inside-files-on-windows-7 – ztk Aug 04 '15 at 13:12
  • After the index is rebuilt with file contents, as mentioned in the comment above, you could search something like `*@*.com` or `*@*.*` if you do not know the domain. – MC10 Aug 04 '15 at 13:49
  • Apparently you can't use multiple wildcards in Windows search so something like `content: *.com` would work if you know it ends in `.com`. Otherwise, just change the ending. – MC10 Aug 04 '15 at 14:03

1 Answers1

1

You can use grep for windows (in that answer there are several download options - https://superuser.com/a/301075/321990).

An example command that will match (it will search for a regex match recursively from where it's executed): grep -r -E ".+\@.+\..+" *

The file matched contains this:
[email protected]
[email protected]
[email protected]
pipi
nana
anilopo$a8

It will print you the 3 email lines, near the file name. It will look like this:
new/yo.txt:[email protected]
Where yo.txt is the file containing the strings above, and located under 'new' folder

If you only want the filenames, you can add the -l parameter to grep:
grep -l -r -E ".+\@.+\..+" *
And it will only print:
new/yo.txt

The regular expression I've used is very simple, and likely to find more things, cause it's not accurate. You can search the web for a better regular expression to check email addresses, and change ".+\@.+\..+" with what you've found.

Hope it helps!

arieljannai
  • 3,079
  • 5
  • 20
  • 36