Searching for files that DONT contain a certain string

Associate
Joined
15 Oct 2005
Posts
647
Hi, i need to search a large amount of text files (aspx.vb) for all files that DONT contain a certain text string. All the tools i've got only seem to be able to search for all instances of a certain string (normally use the excellent Textpad for this sort of thing).

Anyone know a tool that i can point at a directory and it'll tell me all files of a certain type that dont contain the word 'Apples' for example?

Ta
 
Dont know about doze but on *nix you would use "grep -v". I'd imagine that the required effect could be achieved simply by using a negation operator in the regular expression you are using for your search. Both vbs and javascript both have reg exp support IIRC.
 
Ta bledd, thought initially that would be no good as i read the line 'Search for a text string in a file' and seeing as theres 300+ files to search against i didnt fancy the hassle of scripting it to loop through them all. Turns out it can indeed scan a directory though so that'll do the trick!
 
Back
Top Bottom