Friday, November 7, 2014

GrepEmailInTxtFilesRecursively

PowerShell can be used to grep emails from *.txt recursively

Find recursively from root C:\ in all *.txt files emails [any literal]@[any letter]anyNumberOfCharacters.[any letter]from 2 to 6 characters

Get-ChildItem C:\ -include *.txt -rec | Select-String -Pattern "\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,6}" -CaseSensitive

No comments:

HTMLCode

HTMLCode Content