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

Windows 7 search problem

I am trying to find ".reg" in .cpp files on a windows 7 x64 system.  It does not matter if I use quotes or not, it finds files that have the .reg extension, and .cpp files that have "reg" in the contents, but not ".reg".  This happens if I search using he explorer search box, or from Start.  How can I get this search done correctly?
0
eelou
Asked:
eelou
1 Solution
 
Gerwin Jansen, EE MVETopic Advisor Commented:
Don't know how to solve this in W7 search but from a cmd prompt you can do this:
findstr /s /m "\.reg" *.cpp

Open in new window

This will search your current directory and subdirectories for occurrences of .reg and print just the filename if found.
0
 
Seaton007Commented:
Is .reg part of the file name, or part of the text inside the file?  If it's part of the file name, then you can use this to search for it: *.reg*.cpp
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
@seaton007 - asker talks about contents :)
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
kadafitcdCommented:
The regular search for *.reg should suffice if it's in the contents of a .cpp file.

Seaton007 didn't explain the * so I will.

The * is a placeholder for text/numbers/etc. Putting in the *.reg means the search will look for something.reg.  Where as having it without the star, search just looks for the reg and discards the . so having the * makes it look for the . before the reg.
0
 
David Johnson, CD, MVPOwnerCommented:
search for '.reg type:.cpp'
0
 
eelouAuthor Commented:
The accepted solution does the trick (the others do not).  I was hoping to be able to work with the regular Search, but will download and use 'Everything', it is a free tool.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now