views:

560

answers:

8

I'm trying to search using the windows search one of my web directories for any uses of scriptlets. However, the search seems to be ignoring all files ending in .jsp. I searched for plain words, and that didn't work either. Is there a reason Windows ignores these files when searching?

+2  A: 

Try searching for *.jsp and see if any files come up.

Awateru
I'm looking in the directory with the jsps for text inside the jsps
Elie
and yes, it can find the files.
Elie
so you clicked 'all file and folders', and in the 'all or part of the file name' box you put '*.jsp'.In the 'a word or phrase in the file' box you put the text you want to search for.you may want to open one of the files, and search for a word that you can see, just to make sure its searching.
Awateru
I did. I searched for stuff I knew was there, and it didn't find it.
Elie
Try searching for just one word, preferably near the top of one of the documents, to see if Windows is even searching inside the files.
Awateru
I did. The issue seems to be the fact that I'm trying to search inside a jsp file, as opposed to another type of file. It can't find anything inside the jsp files, indicating that it's not even looking at them.
Elie
have you changed permissions on any of the files? if your username doesn't have access to the files, then this is exactly what would happen.
Awateru
I have read/write access to all files and folders in the directory.
Elie
try creating a new jsp file in your 'my documents' folder, and see if Windows can find any words inside of that file. If it can, it seems like a permissions issue with your other files; if it can't, then I'm stumped.
Awateru
still can't find it. thanks for the help, though.
Elie
A: 

Two possibilities:

  1. The folder isn't indexed by windows search
  2. JSP files are flagged as "file properties filter" in the windows search options.

From your "Indexing Options" control panel, add the folder. Under "Advanced", click the "File Types" tab and look for JSP. Change the index to "Index file properties and content" or whatever it's called on your system. You can also add the file type if it's not already listed.

GalacticCowboy
where's the indexing options control panel? I can't seem to find it. I'm using Windows XP.
Elie
You have to have windows desktop search for this I believe.
StingyJack
Ahh... yes, this is for Windows Desktop Search. Windows "classic" search only searches in certain file types also, and I'm not sure if you can change that.
GalacticCowboy
BTW, Windows Desktop Search is a free download for XP and 2003 from the Microsoft site.
GalacticCowboy
+1  A: 

You need to search for a wildcard this being "*" ( without the quotes ). If you'd search for *.txt you'd get all files ending in .txt and if youd write abc.** you'd get all files starting with abc.

So using wildcards will help you find what you are searching for. Try pressing F1 in the Search window ( Ctrl + F )

Filip Ekberg
I've searched using *.jsp. Does not work. I'm trying to look inside the files, and that's when it's ignoring the jsp files.
Elie
A: 

I can suggest you StopKa - desktop search tool; i do not post link here (or it is possible?) cause it will look like ads - cause i am author - try to google for it.

A: 

Using the windows built in find in files for non-standard (popular) file types (anything but .doc, .txt, etc) does not seem to work.

I use UltraEdit32 and its find in files utility to do this for JS and ASP.NET types.

StingyJack
+2  A: 

I suggest you to use this command line utility (a kind of windows grep)

findstr /c:bla /s *.jsp

this will find recursively all files containing bla (and it will highlight the respective lines) and ending in jsp.

Alex. S.
I've found findstr is very fast at looking for a particular string in a bunch of source files, no matter if Windows knows about their extension or not. Alex: I believe it should be findstr /c:"bla" <- you're missing the quotation marks :)
Joe Pineda
Forgot to mention: the obvious benefit of this is that you've got it for free in every copy of Windows - no need to install an additional package to do your searches.
Joe Pineda
+1  A: 

One answer: FileSeek. It's fast, free and will do exactly what you want. It will search inside files and supports regular expressions and wildcard searches.

http://www.binaryfortress.com/fileseek/

Jon Tackabury
+1  A: 

Windows Search won't search within files that it doesn't recognize as a known, searchable type. See this knowledge base article for a description of the problem and a registry hack to get around it for a specific file type. Note that you'd need to do this for each unrecognized file type you wanted to add.

GalacticCowboy
Or, further down the article, there's an additional option to turn it on for all files, at the expense of performance (it will really search in *everything*...)
GalacticCowboy