JSI Tip 4689. More about Windows XP search for All files and folders does NOT find all files when you use a word or phrase?

In tip 4627, I provided a batch file to help you set the plain text filter for extensions that you specify.

I have scripted RegisterPTFAll.bat to register the plain text filter for all extensions that DO NOT have a registered filter.

The syntax for using RegisterPTFAll.bat is:


RegisterPTFAll.bat contains:

@echo off
set pre=
regedit /a "%TEMP%\RegisterPTFwrk.REG" "HKEY_CLASSES_ROOT"
@echo REGEDIT4>"%TEMP%\RegisterPTF.REG"
for /f "Tokens=*" %%i in ('find /i "\[HKEY_CLASSES_ROOT\." "%TEMP%\RegisterPTFwrk.REG"') do @set line=%%i##&call :parse
regedit /s "%TEMP%\RegisterPTF.REG"
del /q "%TEMP%\RegisterPTF.REG"
del /q "%TEMP%\RegisterPTFwrk.REG"
goto :EOF
for /f "Tokens=2-3 Delims=\\]" %%j in ('@echo %line%') do @set ext=%%j&set persist=%%k
if "%persist%" EQU "##" goto previous
if /i "%persist%" EQU "PersistentHandler" set pre=
goto :EOF
if "%pre%" EQU "" goto new
@echo \[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\%pre%\PersistentHandler\]>>"%TEMP%\RegisterPTF.REG"
@echo @="\{5e941d80-bf96-11cd-b579-08002b30bfeb\}">>"%TEMP%\RegisterPTF.REG"
set pre=%ext%
goto :EOF
NOTE: See How can I cause the Windows XP search to include all file types, without registering them?

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.