Question:
How can I search for code within a folder of HTML files? (Windows 7)?
Brian
2011-03-17 12:05:36 UTC
I have a folder on my Windows 7 system that contains about 650 HTML files. I'd like to determine which of these files contains a specific string of text within the HTML code (in this case, I'm searching for part of a URL to a specific page, so I get a list of all HTML pages with links to this specific site). In the older versions of Windows such as XP, in Windows Explorer I could search for files that either had a name containing the search string, or even files that contained the text within them. Is there a way I can do this type of search in Windows 7 to find which HTML files have this string within their code?

I've tried searching from the Start menu, and I just get a list of files that have the string in the folder or file name, but no HTML files containing the string. In searching the web for answers to this, I see info about indexing options, but that doesn't come up in the window, just the list of files.

Thanks in advance for your help!
Brian
Five answers:
crsimon36
2011-03-17 14:19:51 UTC
HTML Kit, Build 292, has a plugin that does a search and replace on a folder full of files. HK Build 292 is free to download and use. Some plugins require that the use of Build 292 be registered to get the right to download. I can't remember in the case of this plugin, name of which is Batch Replace Plugin.



I assume you want to replace something, else why look for it. This plugin will give you a list of the files fitting the criteria of the search and perform the replacement all at the same time. I guess if replacement of something is not part of the operations, then a replacement with the same as the search would probably work.
Ermelinda
2017-01-19 02:29:18 UTC
1
Tdz
2011-03-17 12:11:06 UTC
You have multiple options: I'd download notepad ++ (free GNU) and then open all files and "search". You can always use window's search tool to search inside files or even use macros or regular expression.



With Windows 7: click the desktop once (WIN+D) and press F3. You can then, in advanced, search for terms "in files".



Good luck!
Mike
2011-03-17 12:11:09 UTC
The same in Windows 7. Type the text in the field in right-top corner "Search".
.
2011-03-17 12:15:58 UTC
Dreamweaver has an excellent find or find/replace tool if you happen to have it. If not, Ultraedit will do it as well. http://ultraedit.com


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Continue reading on narkive:
Loading...