Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Newsgroups > Vista General

Vista - How to search for a phrase in a file

Reply
 
Old 03-24-2009   #1 (permalink)
David


 
 

How to search for a phrase in a file

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?


My System SpecsSystem Spec
Old 03-24-2009   #2 (permalink)
Joseph Meehan


 
 

Re: How to search for a phrase in a file



"David" <no@xxxxxx> wrote in message
news:OssHiQKrJHA.1300@xxxxxx
Quote:

> 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



My System SpecsSystem Spec
Old 03-24-2009   #3 (permalink)
John


 
 

Re: How to search for a phrase in a file

Maybe Z:*.bat

"David" <no@xxxxxx> wrote in message
news:OssHiQKrJHA.1300@xxxxxx
Quote:

> 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?
>

My System SpecsSystem Spec
Old 03-24-2009   #4 (permalink)
Gene E. Bloch


 
 

Re: How to search for a phrase in a file

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

> 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
My System SpecsSystem Spec
Old 03-24-2009   #5 (permalink)


VISTA home prem 32bit SP2 --- XP Pro SP3 32bit
 
 

Re: How to search for a phrase in a file

Quote  Quote: Originally Posted by David View Post
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?

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 on vista
http://locate32.net/component/option...page/Itemid,1/
My System SpecsSystem Spec
Old 03-24-2009   #6 (permalink)
DaveD


 
 

Re: How to search for a phrase in a file

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



"Gene E. Bloch" <not-me@xxxxxx> wrote in message
news:1tvhx4qiuspzc.exdc1nwl65ks.dlg@xxxxxx
Quote:

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

>> 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
My System SpecsSystem Spec
Old 03-24-2009   #7 (permalink)
Gene E. Bloch


 
 

Re: How to search for a phrase in a file

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

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

> "Gene E. Bloch" <not-me@xxxxxx> wrote in message
> news:1tvhx4qiuspzc.exdc1nwl65ks.dlg@xxxxxx
Quote:

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

>>> 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
My System SpecsSystem Spec
Old 03-24-2009   #8 (permalink)
Dave Cox


 
 

Re: How to search for a phrase in a file

"Gene E. Bloch" <not-me@xxxxxx> wrote in
news:1tvhx4qiuspzc.exdc1nwl65ks.dlg@xxxxxx:
Quote:

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

>> 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.

My System SpecsSystem Spec
Old 03-25-2009   #9 (permalink)
richard.williams.20


 
 

Re: How to search for a phrase in a file

On Mar 24, 1:15*pm, "David" <n...@xxxxxx> wrote:
Quote:

> 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

My System SpecsSystem Spec
Old 03-25-2009   #10 (permalink)
Gene E. Bloch


 
 

Re: How to search for a phrase in a file

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

> "Gene E. Bloch" <not-me@xxxxxx> wrote in
> news:1tvhx4qiuspzc.exdc1nwl65ks.dlg@xxxxxx:
>
Quote:

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

>>> 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
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
How can I search for word or phrase in a file? Vista file management
Vista phrase search Vista file management
How can I display multi-phrase saved-search queries? Vista file management
Vista won't allow "Find Exact Phrase" search Vista file management
Restore "Find exact phrase" search feature Vista file management


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

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