Findstr finds stuff

11Aug09

Ever since Microsoft decided to remove the file search that actually worked in Windows XP, I’ve been trying to find an easy to use search tool. Turns out it exists – the findstr command line tool. so, for example,

findstr /L /S base.url *.xml

finds all xml files containing the string base.url. It also works for binary files, so when you need to see if a jar in a big list contains a class, you can do

findstr /L SAXSourceLocator *.jar

and it lists the files (together with some junk, but it’s useful none the less. the /L switch means literal comarison, but it can also do regex.



No Responses Yet to “Findstr finds stuff”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.