Looking for text inside files does not work at all



Well do you guys have an idea what "grep" is?
Yes it comes from the *NIX world but is also known beyond ... looking
for an ascii text string in a file.

I'm really desperate now, as this simply does not work on either WinXP
nor Server 2003, but did (and still does) in my old Win2000! I even
retested to be absolutely sure, and yes it works.
It's really annoying if I really need this stuff and have no 3rd-party
tools handy (like UltraEdit) that I have to dual-boot into my old 2000!
The strings appear in plain ascii and are human readable when
hex-editing them, so Windows _ought_ to find them!

But it did not, so I began to investigate a little more...

Let's have a file as an example which you all should have:
\Program Files\Common Files\Microsoft Shared\Speech\SAPI.DLL

Hex-editing the file reveals that there is a string called "reloc" right
at the beginning of the file.
So if text search (aka grep) worked, this should work too shouldn't it?
But it definitely does NOT.
It seems that Microsoft have indeed made a major error here. The second
field (captioned "A word of phrase in the file:") works almost the same
as the uppermost one.

A test:

- I make sure that the option "look in sub-directories" is activated
- I set the "Look in:" directory to
\Program Files\Common Files\Microsoft Shared\Speech\
- Now I input 'cpl' into the field in the middle.
=> I will get two results: sapi.CPL and spCPLui.dll in the 1033
sub-directory.

And now it comes:
I change the term in the _middle_ input field to 'pi.cpl'.
Now the only result I get is sa[pi.cpl] because it matches with 'pi.cpl'.

But wouldn't you expect this middle field is for looking INSIDE the
files, i. e. in the binary code?
That's how it worked in Windows 2000. And apparently this doesn't work
anymore.
Or if, please tell me how. I re-edited the sapi.dll with a hex editor and the filename was NOT contained inside the binary code of the file. So it seems Windows wrongly looked for a match in the file _name_, but not in the file _contents_ (as it should).

The "reloc" string was successfully found in sapi.dll with a 3rd-party
tool, UltraEdit32. ("Search in Files").

-Andreas

.



Relevant Pages

  • Looking for ascii text inside files doesnt work at all
    ... for an ascii text string in a file. ... Hex-editing the file reveals that there is a string called "reloc" right at the beginning of the file. ... So if text search (aka grep) worked, this should work too shouldn't it? ... I change the term in the _middle_ input field to 'i.cpl'. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Simple find and replace
    ... replace" operation on a bunch of files (a-la grep)? ... replace with another string), but I'm still curious if anything like this is ... baked into Windows somewhere... ... There is a windows-version of grep. ...
    (microsoft.public.windowsxp.general)
  • Re: Simple find and replace
    ... Grep for Windows ... Windows Support Center ... | replace with another string), but I'm still curious if anything like this ... |> Bob Altman wrote: ...
    (microsoft.public.windowsxp.general)
  • Re: CreateFile pathname
    ... Virtually all of the Win32 API in Windows CE is using Unicode, not ASCII, ... or how to convert a string into the write format. ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: string in source code is defaulted to unicode?
    ... UNICODE and _UNICODE for Windows CE based projects. ... If you need to work with ASCII string you can use them and the ASCII C ...
    (microsoft.public.windowsce.platbuilder)