Microsoft
Software
Hardware
Network
Question : Perform wildcard search in log files
I have a ton of email log files that are currently in .txt format. I want to search for a text string using a wildcard expression. It looks like the default search tool that comes with Windows does not let you search inside of files with wildcard expressions. If I change the file extension to .csv and then perform a FIND while inside the file, the search appears to works just fine. However, I don't want to have to open up every file to perform the search. I would like to scan the entire directory where the log files reside and find out which log files contain the search string. Is there another tool that can help me accomplish this. My search term would be something similar to this:
RCPT To:<*@domain.com
....where there could be an number of characters in place of the asterik.
Answer : Perform wildcard search in log files
Use the findstr comamnd line tool:
findstr /I /R /M "RCPT To:
[email protected]
" *.txt
It will search all *.txt files for the string and just list the matching file names.The "." right before the @ is the wildcard character.
HTH
Random Solutions
why not embed images in email
Cognos 8.2 Report Studio, date-to-string
SQL sever 2000 schema generator
document not saved
Embed Javascript into txtarea
Powerpoint media catalog file stoped working
IE7 toolbar and Address bar is autohiding
SMTP:550 Too many invalid recipients
MS Win XP SP3 will not install on a Dell Inspiron 700m notebook, which runs XP SP2
How to set identity field to it's init value?