Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perform a Windows Search for files that do not contain certain words 1

Status
Not open for further replies.
Feb 20, 2001
24
US
Hi,
I'm trying to perform a Windows Search for files that do not contain certain words (such as html pages that do not have a title tag). I've tried putting phrases like "NOT title" in the "A word or phrase in the file:" field in Windows Search Results but that does not work. Is there a way that I can do this? Some sort of other syntax I need to use or some advanced option I need to set? Thanks in advance.
 
I am not aware that you can use operators like NOT in a windows search.

You could look into the Google Desktop Search?

You could use the DOS command FIND

find /C /I "title" *.html

would give you a list with the word count - a count of zero is what you are looking for

So

find /C /I "title" *.html > list.txt

would save the results to a file called list.txt

Rather crude but should suffice.


[navy]When I married "Miss Right" I didn't realise her first name was 'always'. LOL[/navy]
 
a count of zero is what you are looking for

That's not the way I read it....

I *believe* that what the user is looking for is a way to search through files (such as html or text files) and return the ones that do *NOT* contain a word.

For example, search all the HTML files, and tell me which ones do *NOT* have "<HEAD" in them.

That's a tough one.



Just my 2¢
-Cole's Law: Shredded cabbage

--Greg
 
A count of zero means the string was NOT found in the file. Crude - but workable? I think so.

The results will contain a list of all the files names followed by the word count.

[navy]When I married "Miss Right" I didn't realise her first name was 'always'. LOL[/navy]
 
Do a Search for the file type concerned.

Copy and paste the files found to a new folder location.

Search that new folder for the word (title?).

Delete the files found.

What are you left with in the new folder?
 
I like that idea linney - neater than mine!

[navy]When I married "Miss Right" I didn't realise her first name was 'always'. LOL[/navy]
 
Download and install Windows Grep from
Choose 'Expert Mode' from the 'Options' menu.

In 'Search Criteria', enter 'title' (without the quotes) as the search string and make sure the 'Invert match' checkbox is ticked.

2b5a46c47c.gif


Point the search to a folder and start your search.

Hope this helps...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top