Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsWindows VistaWindows XPWindows MeWindows 98Windows 95Virtual PCInternet ExplorerOutlook ExpressWindows MediaSecurity
Related Topics
MS Server ProductsMS OfficePC HardwareMore Topics ...

Windows Forum / Windows Vista / File Management / October 2009

Tip: Looking for answers? Try searching our database.

find file containing text inside the file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rgrainer - 10 May 2007 19:38 GMT
Please tell me how can I find a file, such as a text file, that contains a
specific string within the file. For example I create (AutoCAD) Autolisp
programs with an extention of *.lsp which is just a basic text file that
contains my code. In XP (I got rid of the dog and set it up to the advanced
appearance) I just clicked on the search button and entered *.lsp (in the
first box that says "All or part of the file name:") and in the box below
that says "A word or phrase in the file:" I could enter a particular word
that I was sure was in one of my files such as: slope or distance or drain.
In XP this worked very well and I still do it dozens a time a day. Now as I
transition to Vista I need to have this ability, it's a must have. Please let
me know how i can do this. Thanks
Richard
Dave Johnson [MSFT] - 10 May 2007 20:27 GMT
Richard,

The reason that you can't currently do full text searches is becuase the
index is conservative about what file types it crawls to improve your
computer's performance. What you need to do is to add the .lsp file
extension to the index so it looks for these files.

To do that, open Indexing Options in the Control Panel and click Advanced,
then click the File Types tab. Add the .lsp file type and be sure to click
the option to "index properties and file contents."

After the index has had a chance to update, you can type a word or phrase in
the search box to find the file with that text in the contents.

Depending upon where you store these files, you might also need to add the
location to the index. If you keep these files somewhere in your user folder
(Documents, Pictures, Music, etc) you're fine. Otherwise, in the Indexing
Options, click Modify and add the folder to the list of Indexed Locations.

Hope this helps.

Signature

Dave Johnson
Windows User Assistance team
Microsoft Corporation

rgrainer - 10 May 2007 20:59 GMT
Dave
Thanks for the reply. I already had the lsp extension indexed but have
redone the indexing and letting it build index right now. But I am still not
clear on what to type in the search pane to find a .lsp file that contains a
word in the file. Do I need to follow some sort of format or syntax for the
search?
please tell me exactly what I need to type to find the following:

a .lsp file that contains the word "defun" (no quotes in the file...just
shown here for clarity) in the files contents.

By the way I can't really believe that this type of search option (the
ability to search for a word or phrase in the file) has been removed from
vista interface. Is there some reason for this?
Thanks
Richard

> Richard,
>
[quoted text clipped - 16 lines]
>
> Hope this helps.
Dave Johnson [MSFT] - 11 May 2007 17:06 GMT
Richard, to find all the files with the string "defun" in the body of the
document, just type "defun" in the search box. That's really all you need to
do.

The ability to do a full text search hasn't been removed from Windows, it's
been made easier to do so you don't have to dig deep in advanced search
options to turn it on. Believe it or not, many casual users didn't even know
it was possible to do a full text search in Windows XP. Now you just type a
word or phrase and search finds it automatically, without the need to find
additional settings.

If you definitely want to only include a specific file type, then you could
type this in the search box instead:

defun type:lsp

That filters the results to only show files with the indicated file type.

You can learn more about how search works by reading this help topic:

http://windowshelp.microsoft.com/Windows/en-US/Help/73106209-6df0-432a-8cb7-df5d
8ce02ec61033.mspx


Signature

Dave Johnson
Windows User Assistance team
Microsoft Corporation

rgrainer - 11 May 2007 18:24 GMT
Dave
Thanks for the reply. It finally makes sense and I can now find what I'm
looking for because of your reply as well as Dave Woods comments (in the next
reply)

this makes it clear
>defun type:lsp

This is from the help file you referenced (which i had read previous to
posting my question)

>A more specific indication of the file's content. The last three letters of the file name, called the file >name extension, identify the file type. Common types include DOC (Microsoft Word document), XLS
>(Microsoft Excel spreadsheet), JPG (JPEG image), and MP3 (a standard digital audio format).

However in no part of the help file does it mention the use of the word
"ext" to deliniate extention as shown in the next reply to my post by Dave
Wood where he spells it out as shown below:

>So you could type: defun *.lsp

>Or something like: defun ext:lsp
The above makes it really clear.

and you write in your reply:
>If you definitely want to only include a specific file type, then you could
>type this in the search box instead:

>defun type:lsp

again this does not appear in the referenced help article. There is mention
of file types but if you made clear examples of uses of the word "type" as
well as "ext" and how to use it when searching more obvious in your (MS) help
article I think it would help more people to understand how to search with
greater effectiveness. In other words I searched the web and help files for
this information and finally had to resort to this forum in order to find
this critical information. Please consider updating the help to illustrate
this feature.
Thanks again to both of you for providing me with help
Richard

> Richard, to find all the files with the string "defun" in the body of the
> document, just type "defun" in the search box. That's really all you need to
[quoted text clipped - 17 lines]
>
> http://windowshelp.microsoft.com/Windows/en-US/Help/73106209-6df0-432a-8cb7-df5d
8ce02ec61033.mspx
Dave Wood [MS] - 12 May 2007 00:53 GMT
Well that doc isn't meant to be absolutely exhaustive {hence the title}. It
does mention you can use *.<ext> which would get similar results.

There's a more complete syntax guide here:
http://www.microsoft.com/windows/desktopsearch/addresources/advanced3.mspx

You are right we should try and make the complete syntax more easily
accessible.

> Dave
> Thanks for the reply. It finally makes sense and I can now find what I'm
[quoted text clipped - 71 lines]
>>
>> http://windowshelp.microsoft.com/Windows/en-US/Help/73106209-6df0-432a-8cb7-df5d
8ce02ec61033.mspx
steedj - 21 May 2007 02:05 GMT
I have the same problem as Richard, the only difference is that the
files I'm looking for are on the network. wich doen't allow me to find
the files.

Vista search returns nothing, where Xp was returning all I needed. I'm
getting really frustrated as I go through different search programs
because vista is unable to help me there.

I select search, tick the "search non indexed files" type the string
I'm looking for and nothing..

Jonathan

PS: I've added the file extention in the list of files to search.

Signature

steedj

http://forums.techarena.in

Dave Wood [MS] - 11 May 2007 17:12 GMT
You just type into the search box. By default file contents, filenames,
e-mail bodies etc. are all searched automatically.

So you could type: defun *.lsp

Or something like: defun ext:lsp

> Dave
> Thanks for the reply. I already had the lsp extension indexed but have
[quoted text clipped - 42 lines]
>>
>> Hope this helps.
rgrainer - 11 May 2007 18:28 GMT
Dave I replied with my comments to both of you in the post from Dave Johnsons
reply to me.
Thanks for spelling it out and please consider my reply to Dave Johnson
about updating your help files to clarify the use of the words "type" and
"ext"

thanks
Richard

> You just type into the search box. By default file contents, filenames,
> e-mail bodies etc. are all searched automatically.
[quoted text clipped - 49 lines]
> >>
> >> Hope this helps.
Zeerover - 10 Mar 2009 01:50 GMT
I also have the same problem as Richard.  I have a folder full of .aspx
files and want to search for those containing a particular word or
phrase.  In XP you would set the filetype to .aspx and set "Containing
text:" to the phrase you are interested in, hit "Search" and get a
result.  I've tried everything I can think of in Vista with no luck.
(tried setting "Always search file names and contents" and various other
settings. Read Windows Search Advanced Query Syntax at
http://www.microsoft.com/windows/products/winfamily/desktopsearch/technicalresou
rces/advquery.mspx


Perhaps Dave Johnson's solution works, but on my system indexing is not
running, and I don't want to start running it either, so setting
indexing options isn't an option for everyone. I just want Search to
plod through and give a result without having to worry if the index is
up to date etc.

The solution for me ended up being to download free, no adware
AgentRansack 'Agent Ransack - home'
(http://www.mythicsoft.com/agentransack/) which simply installed and
worked. But I'd prefer a Windows solution if there is one.  As Dave
pointed out, apparently Windows filters out certain file extensions,
making their Search function unreliable. You never know whether a file
actually doesn't exist or whether they simply decided to overlook it - a
feature similar to hiding file extensions and system files in folder
options.

Signature

Zeerover

hybridmoments82 - 27 Aug 2009 20:03 GMT
I've been following this thread since I found it via Google.  Very
informative.  I was wondering if there was any way to index a network
location or would I have to index on the server?  I tried to use the
indexing service via Control Panel, but it doesn't seem to pick up any
of my mapped network drives.  Is there a way I can index a network
location on my local Vista machine?  

To add to the problem, I'm running Home Premium x64.  Am I limited
because of the Vista package I'm using?  Can Business accomplish this
task?

Thanks!

Signature

hybridmoments82

. - 28 Aug 2009 01:10 GMT
http://support.microsoft.com/kb/918996

Signature

.
--

>
> I've been following this thread since I found it via Google.  Very
[quoted text clipped - 9 lines]
>
> Thanks!
pacinitaly - 30 Aug 2009 16:13 GMT
try this

+-------------------------------------------------------------------+
|Filename: Capture.JPG                                              |
|Download: http://www.vistax64.com/attachment.php?attachmentid=15278|
+-------------------------------------------------------------------+

Signature

pacinitaly

SpellCherkers aren't worth a shirt ya no

If I helped you, please tip my scales. If I have not, curse me out like
a drunken sailor

SAnton - 21 Oct 2009 11:14 GMT
Imagine the folowing situation: I downloaded .zip-archive with thouzands
of .php-files. I unpacked the file to the folder at my Desktop (which is
indexed by default). I want to find all files containing string «Test».
So, I added «Plain text filter» to the .php files extension in the
indexing settings. Should I wait hours until the indexing will be done?
Or I can just search (more slowly)? I tryed and did not get any results!
So, I will wait. It's very annoying!

Another case: I want to find files containing Russian word
«&#1055;&#1088;&#1080;&#1074;&#1077;&#1090;». The problem is that that
word can be encoded by different bytes depending on codepage (most
popular are cp1251, UTF-8, KOI8-R). I tested text search and found that
if BOM present at the start of the file, file considered UTF-8,
otherwise file considered cp1251. But how about UTF-8 files which do not
have BOM mark at the beginning? When I program PHP I always remove BOM,
because othervise these BOMs are sended to the user-agent by server.
Notepad application still detects UTF-8 in such files, but Search is not
(see attached files). Also, how about KOI8? I didn't find any way to
specify encoding in search options.

Third case: how about different word forms in Russian? «One day» =
«&#1054;&#1076;&#1080;&#1085; &#1076;&#1077;&#1085;&#1100;», «Three
days» = «&#1058;&#1088;&#1080; &#1076;&#1085;&#1103;», «Five days» =
«&#1055;&#1103;&#1090;&#1100; &#1076;&#1085;&#1077;&#1081;», «All these
days» = «&#1042;&#1089;&#1077; &#1101;&#1090;&#1080;
&#1076;&#1085;&#1080;»,... How I will find
«&#1076;&#1077;&#1085;&#1100;» («day») with all possible forms?

It's a pity that Windows text search is completely useless. :(

+-------------------------------------------------------------------+
|Filename: testUTF8NoBOM.txt                                        |
|Download: http://www.vistax64.com/attachment.php?attachmentid=16622|
+-------------------------------------------------------------------+

Signature

SAnton

Retroman - 21 Oct 2009 15:06 GMT
>Imagine the folowing situation: I downloaded .zip-archive with thouzands
>of .php-files. I unpacked the file to the folder at my Desktop (which is
[quoted text clipped - 25 lines]
>
>It's a pity that Windows text search is completely useless. :(

So, you find a few unusual situations that don't work as you would like
and you then conclude that Search is useless?  That is laughable.  I've
been using Windows Search on Vista for over two years, and overall it
works extremely well, once I learned how to use it.

Incidentally, the Desktop folder is *not* indexed by default.  Try moving
your files to your Documents folder.

This forum is actually on Usenet, not on the "parasitic" Web forum that
you posted from.  As a result, the HTML character entity references in
your examples are not decoded for most readers.  It's unlikely that
English-speaking users are going to be able to help you anyway, since your
problems involve searching for Russian words.  I suggest that you look for
a support forum for Russian-speaking users of Vista.

Doug M. in NJ
pacinitaly - 21 Oct 2009 15:39 GMT
SAnton;1173259 Wrote:
> Imagine the folowing situation: I downloaded .zip-archive with thouzands
> of .php-files. I unpacked the file to the folder at my Desktop (which is
[quoted text clipped - 25 lines]
>
> It's a pity that Windows text search is completely useless. :(

love the post!!!

try 'Super Finder 1.5.3.0 Free Download'
(http://freemedia.realgage.com/super-finder-1530.html)

Signature

pacinitaly

SpellCherkers aren't worth a shirt ya no

If I helped you, please tip my scales. If I have not, curse me out like
a drunken sailor

SAnton - 21 Oct 2009 16:50 GMT
pacinitaly;1173379 Wrote:
> > SAnton;1173259 Wrote:
> > Imagine the folowing situation: I downloaded .zip-archive with thouzands
[quoted text clipped - 31 lines]
> try 'Super Finder 1.5.3.0 Free Download'
> (http://freemedia.realgage.com/super-finder-1530.html)

I have tryed Super Finder. It fast, perform real content search. That
is good.

First I tryed it on my folder with 300 PHP-files (don't worry, these
files are English-only). It found 3 files compared to the 1 file found
by Vista using the same search query. That is very strange: it looks
like Vista Search is approximate and unreliable. Imagine that your boss
required you to find all files containing "bucks" and replace these by
"dollars". Failed to perform this task may result in serious
consequences for you.

The bad thing is that Russian text was found only in CP1251-encoded
text files. UTF-8 files (with and without BOM) are ignored. I tryed to
check «unicode» checkbox in the Super Finder, but in that case I got
zero results. This is worse than Vista search, which at least can
recognise UTF-8 by BOM.

Signature

SAnton

pacinitaly - 22 Oct 2009 02:12 GMT
SAnton;1173442 Wrote:
> > pacinitaly;1173379 Wrote:
> > > > SAnton;1173259 Wrote:
[quoted text clipped - 49 lines]
> zero results. This is worse than Vista search, which at least can
> recognise UTF-8 by BOM.

sorry:(

Signature

pacinitaly

SpellCherkers aren't worth a shirt ya no

If I helped you, please tip my scales. If I have not, curse me out like
a drunken sailor

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.