• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 116
  • Last Modified:

Searching Files for Pattern

Does anyone know of a good utility to search an entire 2003/2008 file server looking for matching patterns in files.   for example to search all files on a files server that have text matching xx-xxx-xxxx (SS#).
0
jhunter9999
Asked:
jhunter9999
  • 2
  • 2
  • 2
  • +1
1 Solution
 
Thibault St john Cholmondeley-ffeatherstonehaugh the 2ndCommented:
There was/is a unix command grep which someone wrote a windows version of. If it's been updated it should be what you need. It was very fast and powerful.
0
 
Thibault St john Cholmondeley-ffeatherstonehaugh the 2ndCommented:
Here is a download, looks like it is still current:
 http://www.wingrep.com/
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
awking00Commented:
Are you talking about a windows server or something else?
0
 
jhunter9999Author Commented:
Yes,on a windows 2003/2008.    I'm not looking to search files for exact text such as
54-011-9876, but as a matching pattern.   You ask the utility to find any files with data matching a pattern like xx-xxx-xxxx. This is just an example, it might be other patterns as well.
0
 
awking00Commented:
At windows command prompt
findstr /r /s /m /c:"[0-9][0-9]-[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]" *
Will find files with patterns such as 54-011-9876 or 12-345-6789. Unfortunately findstr does not have a means of determining exact number of matches as in most regular expressions (e.g. [0-9]{3} would find 3 consecutive numbers only), so it would also find files with patterns like 123-456-7890 or 12-345-67890.
0
 
jhunter9999Author Commented:
That works !!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now