使用 Windows 搜索以 jsp 结尾的文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/337602/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Search using Windows for files ending in jsp
提问by Elie
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?
我正在尝试使用 windows 搜索我的 Web 目录之一来搜索脚本的任何用途。但是,搜索似乎忽略了所有以 .jsp 结尾的文件。我搜索了简单的词,但这也不起作用。Windows 在搜索时是否有理由忽略这些文件?
回答by Alex. S.
I suggest you to use this command line utility (a kind of windows grep)
我建议你使用这个命令行实用程序(一种 windows grep)
findstr /c:bla /s *.jsp
findstr /c:bla /s *.jsp
this will find recursively all files containing bla
(and it will highlight the respective lines) and ending in jsp
.
这将递归地找到所有包含bla
(并突出显示相应行)并以jsp
.
回答by Filip Ekberg
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.
您需要搜索通配符“*”(不带引号)。如果您搜索 *.txt,您将获得所有以 .txt 结尾的文件,如果您编写 abc.**,您将获得所有以 abc 开头的文件。
So using wildcards will help you find what you are searching for. Try pressing F1 in the Search window ( Ctrl + F )
因此,使用通配符将帮助您找到要搜索的内容。尝试在搜索窗口中按 F1 ( Ctrl + F )
回答by GalacticCowboy
Windows Search won't search within files that it doesn't recognize as a known, searchable type. See this knowledge base articlefor 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 eachunrecognized file type you wanted to add.
Windows Search 不会在它无法识别为已知可搜索类型的文件中进行搜索。请参阅此知识库文章,了解问题的描述以及针对特定文件类型绕过该问题的注册表技巧。请注意,您需要为要添加的每种无法识别的文件类型执行此操作。
回答by Awateru
Try searching for *.jsp and see if any files come up.
尝试搜索 *.jsp 并查看是否出现任何文件。
回答by GalacticCowboy
Two possibilities:
两种可能:
- The folder isn't indexed by windows search
- JSP files are flagged as "file properties filter" in the windows search options.
- 该文件夹未被 Windows 搜索索引
- JSP 文件在 Windows 搜索选项中被标记为“文件属性过滤器”。
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.
从“索引选项”控制面板中,添加文件夹。在“高级”下,单击“文件类型”选项卡并查找 JSP。将索引更改为“索引文件属性和内容”或系统上调用的任何内容。如果尚未列出文件类型,您还可以添加该文件类型。
回答by Jon Tackabury
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.
一个答案:FileSeek。它快速、免费并且完全符合您的要求。它将搜索文件内部并支持正则表达式和通配符搜索。
回答by StingyHyman
Using the windows built in find in files for non-standard (popular) file types (anything but .doc, .txt, etc) does not seem to work.
对非标准(流行)文件类型(除 .doc、.txt 等之外的任何内容)使用文件中内置的 Windows 查找似乎不起作用。
I use UltraEdit32 and its find in files utility to do this for JS and ASP.NET types.
我使用 UltraEdit32 及其在文件实用程序中的查找来为 JS 和 ASP.NET 类型执行此操作。
回答by user42632
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.
我可以建议你 StopKa - 桌面搜索工具;我不在这里发布链接(或者有可能吗?)因为它看起来像广告 - 因为我是作者 - 尝试谷歌搜索。