Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XP Find file 2nd try
Message
De
07/03/2002 04:32:12
 
 
À
07/03/2002 03:49:35
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00629146
Message ID:
00629414
Vues:
20
This message has been marked as the solution to the initial question of the thread.
Cetin,
I found an interesting link with google, but the link seems to be dead. Fortunately, the article is still in google's cache (what a brilliant search engine). I find it strange that no other article mentions that file types have to be registered. Anyway, here's the article:


4627 » Windows XP search for All files and folders does NOT find all files when you use a word or phrase?
Windows XP requires that a valid filter component be registered for each file type, if it is to be found when using a word or phrase in the search criteria.
Filters are provided for MIME files, HTML, plain text and binary files, and Microsoft Word, Excel, and PowerPoint.

If you go to Windows Update and download the Windows XP Application Compatibility Update, October 25, 2001, it will add filters to the following extensions:

.386
.aifc
.aiff
.asm
.asx
.au
.AudioCD
.bkf
.bmp
.c
.cda
.cpl
.cpp
.css
.cur
.cxx
.def
.DeskLink
.dib
.drv
.dvd
.emf
.fnd
.folder
.gz
.h
.hpp
.hta
.htt
.hxx
.idl
.inc
.ivf
.jfif
.jpe
.jpeg
.js
.latex
.log
.m1v
.m3u
.MAPIMail
.mid
.midi
.mp2
.mp2v
.mpa
.mpe
.mpeg
.mpg
.mpv2
.mydocs
.pl
.rle
.rmi
.png
.rc
.rtf
.sit
.snd
.tgz
.url
.vxd
.wax
.wm
.wma
.wmp
.wmv
.wmx
.wmz
.wsz
.wvx
.xbm
.xml
.xsl
.ZFSendToTargetFor other file types, check with the vendor for a filter. In most cases, registering the plain text filter for a file type will work.
I have scripted RegisterPFT.bat to register the plain text filter on the extensions that you enter. The syntax is:

RegisterPTF .ex1 [.ex2] [.ex3] ... [.exn]

where .ex1 is an extension, in the form of .xxx. You may include as many extensions as you wish.

NOTE: If you include an extension that is a already registered, it will be overwritten with the plain text filter. As you can see from the batch file, a registered extension has a PersistentHandler subkey and a (Default) value like {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}.

RegisterPFT.bat contains:

@echo off
setlocal
if {%1}=={} goto syntax
set ext=%1
if {%ext:~0,1%} NEQ {.} goto syntax
@echo REGEDIT4>"%TEMP%\RegisterPTFwrk.REG"
@echo [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\%ext%\PersistentHandler]>>"%TEMP%\RegisterPTFwrk.REG"
@echo @="{5e941d80-bf96-11cd-b579-08002b30bfeb}">>"%TEMP%\RegisterPTFwrk.REG"
:loop
shift
if {%1}=={} goto :done
set ext=%1
if {%ext:~0,1%} NEQ {.} goto syntax
@echo [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\%ext%\PersistentHandler]>>"%TEMP%\RegisterPTFwrk.REG"
@echo @="{5e941d80-bf96-11cd-b579-08002b30bfeb}">>"%TEMP%\RegisterPTFwrk.REG"
goto loop
:syntax
@echo Syntax: RegisterPTF .ex1 [.ex2] [.ex3] ... [.exn]&goto :EOF
endlocal
goto :EOF
:done
regedit /s "%TEMP%\RegisterPTFwrk.REG"
endlocal


HTH
>Thanks Daniel,
>I already tried with and w/o indexing service. In win9x and 2k this was easy to do.
>Cetin
>
>>Cetin,
>>I don't have XP to test, but I sure feel your pain. I use the windows search tool all the time and couldn't be without it. While I don't have an answer, I found a couple of links that may give you some ideas:
>>
>>http://www.pcworld.com/howto/article/0,aid,78055,00.asp
>>http://www.microsoft.com/mspress/books/sampchap/5207f.asp
>>
>>It seems that the search companion uses indexes to find files. Could it be a problem with the search index?
>>
>>>How do you search for a file that you know extension of file that contains known word(s) ? IOW what does 'A word or a phrase in the file:' exactly mean ?
>>>If I have a file named 'myfile.prg' with 'SQLExec(' in it :
>>>Filename : myfile
>>>Finds that one along with others.
>>>Filename : myfile
>>>A word or a phrase in the file: SQLExec
>>>or %SQLExec%, *SQLExec*, [SQLExec], "SQLExec"
>>>fails. What is the trick ? Could anyone made this work in XP ?
>>>PS: Not talking about VFP filer nor coding myself only winkey+F.
>>>Cetin
Daniel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform