Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > How to search for a phrase in a file

Reply
Thread Tools Display Modes

How to search for a phrase in a file

 
 
David
Guest
Posts: n/a

 
      03-24-2009
In windows XP's search options you could use the option to find a phrase
within a set of files.
I want to search all .bat files for the phrase "Z:"
How do I do this in vista?

 
Reply With Quote
 
 
 
 
Joseph Meehan
Guest
Posts: n/a

 
      03-24-2009


"David" <> wrote in message
news:...
> In windows XP's search options you could use the option to find a phrase
> within a set of files.
> I want to search all .bat files for the phrase "Z:"
> How do I do this in vista?
>


I have not played with it in Vista yet, it appears to me to look a
little different, but with the same features. Try holding the windows key
and pressing the "F" key.

--
Joseph Meehan

Dia 's Muire duit



 
Reply With Quote
 
John
Guest
Posts: n/a

 
      03-24-2009
Maybe Z:*.bat

"David" <> wrote in message
news:...
> In windows XP's search options you could use the option to find a phrase
> within a set of files.
> I want to search all .bat files for the phrase "Z:"
> How do I do this in vista?
>



 
Reply With Quote
 
Gene E. Bloch
Guest
Posts: n/a

 
      03-24-2009
On Tue, 24 Mar 2009 10:15:26 -0700, David wrote:

> In windows XP's search options you could use the option to find a phrase
> within a set of files.
> I want to search all .bat files for the phrase "Z:"
> How do I do this in vista?


Vista search has a fair amount of power, but it seems to be poorly
documented. Is this an understatement? Even two (non-MS) books that I
bought are not helpful...

If indexing is on, Vista searches for contents as well as names. Here's
what I just did: in the search bar, I typed "ext:doc AND smith" (wihtout
the quotes) and I found a list of my doc files that have the word smith in
them.

So, if your bat files are indexed, you could type "ext:bat AND z:". This
should work, unless Vista gets all huffy about z: being a drive name (and
of course the colon is a delimiter in this situation).

....Well, I just tested it. Vista seems not to understand the colon.

Next alternative: download the free search program 'Agent Ransack' and use
it. People here love it. I don't *love* it, but it has helped me a few
times. And it does the job you asked for (I just tested it to make sure).

--
Gene E. Bloch letters0x40blochg0x2Ecom
 
Reply With Quote
 
pacinitaly
Guest
Posts: n/a

 
      03-24-2009

David;1000291 Wrote:
> In windows XP's search options you could use the option to find a phras
> within a set of files
> I want to search all .bat files for the phrase "Z:
> How do I do this in vista


try this app, I LOVE it. Not as good as XP but close
I would love to use the search enging from XP but don't how o
vista:cry
http://locate32.net/component/option...tpage/Itemid,1

--
pacinitaly
 
Reply With Quote
 
DaveD
Guest
Posts: n/a

 
      03-24-2009
Pathetic, isn't it?
2009 and we're back to a DOS interface



"Gene E. Bloch" <not-> wrote in message
news:...
> On Tue, 24 Mar 2009 10:15:26 -0700, David wrote:
>
>> In windows XP's search options you could use the option to find a phrase
>> within a set of files.
>> I want to search all .bat files for the phrase "Z:"
>> How do I do this in vista?

>
> Vista search has a fair amount of power, but it seems to be poorly
> documented. Is this an understatement? Even two (non-MS) books that I
> bought are not helpful...
>
> If indexing is on, Vista searches for contents as well as names. Here's
> what I just did: in the search bar, I typed "ext:doc AND smith" (wihtout
> the quotes) and I found a list of my doc files that have the word smith in
> them.
>
> So, if your bat files are indexed, you could type "ext:bat AND z:". This
> should work, unless Vista gets all huffy about z: being a drive name (and
> of course the colon is a delimiter in this situation).
>
> ...Well, I just tested it. Vista seems not to understand the colon.
>
> Next alternative: download the free search program 'Agent Ransack' and use
> it. People here love it. I don't *love* it, but it has helped me a few
> times. And it does the job you asked for (I just tested it to make sure).
>
> --
> Gene E. Bloch letters0x40blochg0x2Ecom


 
Reply With Quote
 
Gene E. Bloch
Guest
Posts: n/a

 
      03-24-2009
On Tue, 24 Mar 2009 18:07:32 -0500, DaveD wrote:

> Pathetic, isn't it?
> 2009 and we're back to a DOS interface


Huh?

> "Gene E. Bloch" <not-> wrote in message
> news:...
>> On Tue, 24 Mar 2009 10:15:26 -0700, David wrote:
>>
>>> In windows XP's search options you could use the option to find a phrase
>>> within a set of files.
>>> I want to search all .bat files for the phrase "Z:"
>>> How do I do this in vista?

>>
>> Vista search has a fair amount of power, but it seems to be poorly
>> documented. Is this an understatement? Even two (non-MS) books that I
>> bought are not helpful...
>>
>> If indexing is on, Vista searches for contents as well as names. Here's
>> what I just did: in the search bar, I typed "ext:doc AND smith" (wihtout
>> the quotes) and I found a list of my doc files that have the word smith in
>> them.
>>
>> So, if your bat files are indexed, you could type "ext:bat AND z:". This
>> should work, unless Vista gets all huffy about z: being a drive name (and
>> of course the colon is a delimiter in this situation).
>>
>> ...Well, I just tested it. Vista seems not to understand the colon.
>>
>> Next alternative: download the free search program 'Agent Ransack' and use
>> it. People here love it. I don't *love* it, but it has helped me a few
>> times. And it does the job you asked for (I just tested it to make sure).
>>
>> --
>> Gene E. Bloch letters0x40blochg0x2Ecom



--
Gene E. Bloch letters0x40blochg0x2Ecom
 
Reply With Quote
 
Dave Cox
Guest
Posts: n/a

 
      03-24-2009
"Gene E. Bloch" <not-> wrote in
news::

> On Tue, 24 Mar 2009 10:15:26 -0700, David wrote:
>
>> In windows XP's search options you could use the option to find a
>> phrase within a set of files.
>> I want to search all .bat files for the phrase "Z:"
>> How do I do this in vista?

>
> Vista search has a fair amount of power, but it seems to be poorly
> documented. Is this an understatement? Even two (non-MS) books
> that I bought are not helpful...
>
> If indexing is on, Vista searches for contents as well as names.
> Here's what I just did: in the search bar, I typed "ext:doc AND
> smith" (wihtout the quotes) and I found a list of my doc files
> that have the word smith in them.
>
> So, if your bat files are indexed, you could type "ext:bat AND
> z:". This should work, unless Vista gets all huffy about z: being
> a drive name (and of course the colon is a delimiter in this
> situation).
>
> ...Well, I just tested it. Vista seems not to understand the
> colon.
>
> Next alternative: download the free search program 'Agent Ransack'
> and use it. People here love it. I don't *love* it, but it has
> helped me a few times. And it does the job you asked for (I just
> tested it to make sure).
>


I just typed "*.txt AND 452B" in the start search and it found a
text file with 452B in it.

Should work with a .bat file if indexing is on.

 
Reply With Quote
 
richard.williams.20@gmail.com
Guest
Posts: n/a

 
      03-25-2009
On Mar 24, 1:15*pm, "David" <n...@email.com> wrote:
> In windows XP's search options you could use the option to find a phrase
> within a set of files.
> I want to search all .bat files for the phrase "Z:"
> How do I do this in vista?


When Vista files are NOT indexed, use the following in biterscripting
(http://www.biterscripting.com/install.html for free download) .

script SS_FindStr.txt files("*.bat") dir("C:/Program Files") str("Z:")

Will list all .bat files showing line numbers and line text containing
the string "Z:" .

To search by REGULAR EXPRESION instead of string, use the following.

script SS_FindRE.txt files("*.bat") dir("C:/Program Files") str
(<reg_expr>)

Avoid searching directly into C:/ - it will be slow - operating system
"holds" some of the files.

These scripts work in all Windows versions, and irrespective of
whether files are indexed or not.

Take care.

Richard

 
Reply With Quote
 
Gene E. Bloch
Guest
Posts: n/a

 
      03-25-2009
On Tue, 24 Mar 2009 17:24:25 -0700, Dave Cox wrote:

> "Gene E. Bloch" <not-> wrote in
> news::
>
>> On Tue, 24 Mar 2009 10:15:26 -0700, David wrote:
>>
>>> In windows XP's search options you could use the option to find a
>>> phrase within a set of files.
>>> I want to search all .bat files for the phrase "Z:"
>>> How do I do this in vista?

>>
>> Vista search has a fair amount of power, but it seems to be poorly
>> documented. Is this an understatement? Even two (non-MS) books
>> that I bought are not helpful...
>>
>> If indexing is on, Vista searches for contents as well as names.
>> Here's what I just did: in the search bar, I typed "ext:doc AND
>> smith" (wihtout the quotes) and I found a list of my doc files
>> that have the word smith in them.
>>
>> So, if your bat files are indexed, you could type "ext:bat AND
>> z:". This should work, unless Vista gets all huffy about z: being
>> a drive name (and of course the colon is a delimiter in this
>> situation).
>>
>> ...Well, I just tested it. Vista seems not to understand the
>> colon.
>>
>> Next alternative: download the free search program 'Agent Ransack'
>> and use it. People here love it. I don't *love* it, but it has
>> helped me a few times. And it does the job you asked for (I just
>> tested it to make sure).
>>

>
> I just typed "*.txt AND 452B" in the start search and it found a
> text file with 452B in it.
>
> Should work with a .bat file if indexing is on.


Weird. I had been unable to succeed with "*.txt" or whatever before (in
Windows Explorer in Vista), so I was happy when I stumbled onto the syntax
"ext:txt".

Then I get a reply from you that makes a liar (OK, a confused person!) out
of me - so I tested "*.txt" and it worked. What's going on here? :-)

I guess I might have found a setting to enable regular expressions (or at
least wild cards), changed it, and then forgot - or somehow changed it
unconsciously. Or there's no such setting, and I just managed to screw up
before. One of life's little mysteries...

--
Gene E. Bloch letters0x40blochg0x2Ecom
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I search for word or phrase in a file? jb5qld Windows Vista File Management 5 03-27-2009 05:48 PM
Vista phrase search rich Windows Vista File Management 2 04-08-2008 07:41 PM
How can I display multi-phrase saved-search queries? Baffin Windows Vista File Management 0 08-04-2007 07:28 PM
Vista won't allow "Find Exact Phrase" search FrustratedVistaUser Windows Vista File Management 1 06-06-2007 04:13 PM
Restore "Find exact phrase" search feature FrustratedVistaUser Windows Vista File Management 2 06-05-2007 08:53 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59