Problem Using FileSearch

M

mbf

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
 
M

mbf

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top