Yeah, that's what I have been doing as well. It basically forces you to search twice, though.
1. Seach for "foo", see in results that it exists in files in folders A, B and C. If you just want to replace the occurrences in A and B
2. search again, excluding C, and replace.
But what if I want to replace "foo" in just a few files in folder A, not in all of them. Then I have to open them all individually, as eyewinder mentioned.
I think Textmate's solution for this is really nice, where you can select individual files or whole folders in the search results and just do the replace on them.