We are currently using the FileSearch object to search a
directory for files containing certain text. This works
as long as what we are searching for is an alpha or
numeric character set -- when we go to search for a
different type of character or series of characters, such
as a series of dashes or underscores, the FileSearch
object appears to ignore what we have specified
as "TextOrProperty" and simply returns a list of files
based on the filename pattern only.

Is there any way to specify a non-alpha, non-numeric
character set as the text to search for and have
FileSearch return the correct results? If not, is there
some other object or perhaps an API call we could use to
accomplish this? BTW, we are on WinXP using VB6 and
automating Word to use FileSearch.

Thanks in advance for any insights ... mbf

Re: Problem Using FileSearch by Perry

Perry
Wed Jan 07 09:57:06 CST 2004

Try to use FileSystemObject instead

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odeopg/html
/deconreturningfilesfromfilesystem.asp

Krgrds,
Perry

"mbf" <anonymous@discussions.microsoft.com> wrote in message
news:0a6201c3d52d$16ee0c90$a501280a@phx.gbl...
> We are currently using the FileSearch object to search a
> directory for files containing certain text. This works
> as long as what we are searching for is an alpha or
> numeric character set -- when we go to search for a
> different type of character or series of characters, such
> as a series of dashes or underscores, the FileSearch
> object appears to ignore what we have specified
> as "TextOrProperty" and simply returns a list of files
> based on the filename pattern only.
>
> Is there any way to specify a non-alpha, non-numeric
> character set as the text to search for and have
> FileSearch return the correct results? If not, is there
> some other object or perhaps an API call we could use to
> accomplish this? BTW, we are on WinXP using VB6 and
> automating Word to use FileSearch.
>
> Thanks in advance for any insights ... mbf



Re: Problem Using FileSearch by anonymous

anonymous
Thu Jan 08 11:06:19 CST 2004

While we could use FileSystemObject to return a list of file names, we want to use the text within the file (not within the file name) as a criterion for including a file in our returned list. For example, return all files whose text contains "______" (series of 5 underscores). This is what the "Search" tool in Word and other Office products purports to do, but it is not working for a non-alpha, non-numeric text search such as my example above -- it is only working for a search for specific words or phrases within the files

Good suggestion for filename searches, but not what we're looking for

----- Perry wrote: ----

Try to use FileSystemObject instea

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odeopg/htm
/deconreturningfilesfromfilesystem.as

Krgrds
Perr

"mbf" <anonymous@discussions.microsoft.com> wrote in messag
news:0a6201c3d52d$16ee0c90$a501280a@phx.gbl..
> We are currently using the FileSearch object to search
> directory for files containing certain text. This work
> as long as what we are searching for is an alpha o
> numeric character set -- when we go to search for
> different type of character or series of characters, suc
> as a series of dashes or underscores, the FileSearc
> object appears to ignore what we have specifie
> as "TextOrProperty" and simply returns a list of file
> based on the filename pattern only
>> Is there any way to specify a non-alpha, non-numeri
> character set as the text to search for and hav
> FileSearch return the correct results? If not, is ther
> some other object or perhaps an API call we could use t
> accomplish this? BTW, we are on WinXP using VB6 an
> automating Word to use FileSearch
>> Thanks in advance for any insights ... mb