Search in *.rex files

  • Follow


Just a little bit OT:
How do I search (in Win XP) for specific code in my .rex files?
Example: I know I have used %2F before in a program, which one was it?
The default Win search mechanisme does not find anything.
Thanks,
Wim Dirks 


0
Reply Wim 2/3/2005 10:16:11 AM

"Wim Dirks" <wimp4u@hotmail.com> wrote in message
news:4201f9dd$0$12085$d5255a0c@news.wanadoo.nl...
> Just a little bit OT:
> How do I search (in Win XP) for specific code in my .rex files?
> Example: I know I have used %2F before in a program, which one was it?
> The default Win search mechanisme does not find anything.
> Thanks,
> Wim Dirks
>

Both Off Topic and unclear.

If you're looking for the character string '%2F' then Windows XP search on
my machine finds that just fine.
If you're looking for the ASCII character '/' = Hex'2F' then you should
expect it to be in all of your Rexx files.

If the question is how to do a search for a character given it's hexadecimal
representation then you might come back on topic, because I'm not aware of
anything in Windows OS that will do that, so you could write a small Rexx
script to do it.

You could pipe a directory listing into a file e.g.
      'DIR *.rex /B > myDir.txt'
Then you could loop through each line in each file in the list testing for
the character string. e.g.

      filename = linein('myDir.txt')
      do while lines(filename)>0
         if pos('2F'x,linein(filename)) > 0 then say filename
      end
   (** Warning ** This is an Untested Code Snippet **)

If I've missed the point you'll need to clarify your question.

Regards,
Chris.


0
Reply Chris 2/3/2005 11:22:14 AM


Wim,
I made a post to the RexxLA concerning this a while back.  I will look
it up and post it in a few minutes.  The problem is that WinXP doesn't
recognize the .rex extension.  To prove that, seach a .rex file for
the instance of a particuliar string that you know is in there.  You
will get NO results.  Rename the file with a .txt extension and the
WinXP seach will find it.

I'll be back as soon as I find my "fix".

Lee

On Thu, 3 Feb 2005 11:22:14 +0000 (UTC), "Chris"
<c_bartlett@btconnect.com> wrote:

>
>"Wim Dirks" <wimp4u@hotmail.com> wrote in message
>news:4201f9dd$0$12085$d5255a0c@news.wanadoo.nl...
>> Just a little bit OT:
>> How do I search (in Win XP) for specific code in my .rex files?
>> Example: I know I have used %2F before in a program, which one was it?
>> The default Win search mechanisme does not find anything.
>> Thanks,
>> Wim Dirks
>>
>
>Both Off Topic and unclear.
>
>If you're looking for the character string '%2F' then Windows XP search on
>my machine finds that just fine.
>If you're looking for the ASCII character '/' = Hex'2F' then you should
>expect it to be in all of your Rexx files.
>
>If the question is how to do a search for a character given it's hexadecimal
>representation then you might come back on topic, because I'm not aware of
>anything in Windows OS that will do that, so you could write a small Rexx
>script to do it.
>
>You could pipe a directory listing into a file e.g.
>      'DIR *.rex /B > myDir.txt'
>Then you could loop through each line in each file in the list testing for
>the character string. e.g.
>
>      filename = linein('myDir.txt')
>      do while lines(filename)>0
>         if pos('2F'x,linein(filename)) > 0 then say filename
>      end
>   (** Warning ** This is an Untested Code Snippet **)
>
>If I've missed the point you'll need to clarify your question.
>
>Regards,
>Chris.
>

0
Reply Lee 2/3/2005 12:36:44 PM

In article <9m6401504mavt5oi3puh57cefk2dfssih7@4ax.com>, Lee Peedin 
(lpeedinREMOVE@UPPERCASEnc.rr.com) says...
> Wim,
> I made a post to the RexxLA concerning this a while back.  I will look
> it up and post it in a few minutes.  The problem is that WinXP doesn't
> recognize the .rex extension.  To prove that, seach a .rex file for
> the instance of a particuliar string that you know is in there.  You
> will get NO results.  Rename the file with a .txt extension and the
> WinXP seach will find it.
> 
> I'll be back as soon as I find my "fix".
> 
> Lee
> 

Just install Agent Ransack (or another search tool).
0
Reply Gert 2/3/2005 12:45:38 PM

Wim,
Here is my message from June 16, 2004 to the RexxLA concerning this
issue.  Try it, it does work.

Lee

-----Original Message-----
From: Rexx Language Association [mailto:REXXLA@lists.psu.edu] On
Behalf Of Lee Peedin
Sent: Wednesday, June 16, 2004 8:26 AM
To: REXXLA@LISTS.PSU.EDU
Subject: Atten: Windows XP Rexx Users

OK, this is not specific to Rexx, but I think all WinXP users can
benefit from this information.  

Have you ever tried to use the WinXP search files & folders function
to find a specific string of text in your .rex or .cmd files and did
not get any results (even though you know that the string exists in
one or more files)?

It seems that MicroSoft in their infinite wisdom decided to make this
search feature only work on “certain” extensions known to Windows (and
..rex is not one of them).

You can edit the registry and set up each extension, but that’s a lot
of work.

Please note: the following information was copied (and corrected) from
this web address:
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=323

So if you want all extensions searched when you're looking for string
inside files, follow this method:

1. Click Start > Search > and click Change Preferences.

2. Click With Indexing Service (for faster local searches).

3. Click Change Indexing Service Settings (Advanced).

This will bring up the Indexing Service window.

4. Click  View > Customize.

5. Place a checkmark next to Console Tree and click OK.

6. In the left hand pane, right click the entry named Indexing Service
on Local Machine and choose Properties.

7. Place a checkmark next to Index files with unknown extensions.

Done.  If the change doesn't take immediate effect, reboot.

Lee


On Thu, 3 Feb 2005 11:16:11 +0100, "Wim Dirks" <wimp4u@hotmail.com>
wrote:

>Just a little bit OT:
>How do I search (in Win XP) for specific code in my .rex files?
>Example: I know I have used %2F before in a program, which one was it?
>The default Win search mechanisme does not find anything.
>Thanks,
>Wim Dirks 
>

0
Reply Lee 2/3/2005 12:57:39 PM

Just get a copy of grep for Win32 and use it at the command line... I.E. the real operating system! ;-)

-- 
Michael Lueck
Lueck Data Systems

Remove the upper case letters NOSPAM to contact me directly.
0
Reply Michael 2/3/2005 1:19:32 PM

There's no reason to pull another 3 party product into the mix when a
simple change to the WinXP search parameters will fix the issue.

I was given the same advice by some Linux gurus in our office, but
chose to find the cause of the issue - not a bandage to cover it up.
Lee

On Thu, 03 Feb 2005 08:19:32 -0500, Michael Lueck
<NmlueckO@SlueckPdataAsystemsM.com> wrote:

>Just get a copy of grep for Win32 and use it at the command line... I.E. the real operating system! ;-)

0
Reply Lee 2/3/2005 4:16:40 PM

In article <9fj401h25hpumats4n43rus9vutmgg23fi@4ax.com>, Lee Peedin 
(lpeedinREMOVE@UPPERCASEnc.rr.com) says...
> There's no reason to pull another 3 party product into the mix when a
> simple change to the WinXP search parameters will fix the issue.
> 
> I was given the same advice by some Linux gurus in our office, but
> chose to find the cause of the issue - not a bandage to cover it up.
> Lee
> 

Other products (like Agent Ransack and grep)  allow regular 
expressions and multiple directories. This gives much more powerfull 
search options then the default XP search option.
0
Reply Gert 2/3/2005 4:23:24 PM

Gert van der Kooij <gert@invalid.nl> wrote in 
news:MPG.1c6c6e6b341d92269897cd@news.xs4all.nl:

> In article <9fj401h25hpumats4n43rus9vutmgg23fi@4ax.com>, Lee Peedin 
> (lpeedinREMOVE@UPPERCASEnc.rr.com) says...
>> There's no reason to pull another 3 party product into the mix when a
>> simple change to the WinXP search parameters will fix the issue.
>> 
>> I was given the same advice by some Linux gurus in our office, but
>> chose to find the cause of the issue - not a bandage to cover it up.
>> Lee
>> 
> 
> Other products (like Agent Ransack and grep)  allow regular 
> expressions and multiple directories. This gives much more powerfull 
> search options then the default XP search option.
> 

Windows has a perfectly good grep command, it's just not named 'grep', 
it's named 'findstr' and supports regular expressions, sub directory 
searches, etc.

Wayne
0
Reply Wayne 2/3/2005 5:47:53 PM

Wayne Tilton wrote:
> Gert van der Kooij <gert@invalid.nl> wrote in
> news:MPG.1c6c6e6b341d92269897cd@news.xs4all.nl:
>
> > In article <9fj401h25hpumats4n43rus9vutmgg23fi@4ax.com>, Lee Peedin

> > (lpeedinREMOVE@UPPERCASEnc.rr.com) says...
> >> There's no reason to pull another 3 party product into the mix
when a
> >> simple change to the WinXP search parameters will fix the issue.
> >>
> >> I was given the same advice by some Linux gurus in our office, but
> >> chose to find the cause of the issue - not a bandage to cover it
up.
> >> Lee
> >>
> >
> > Other products (like Agent Ransack and grep)  allow regular
> > expressions and multiple directories. This gives much more
powerfull
> > search options then the default XP search option.
> >
>
> Windows has a perfectly good grep command, it's just not named
'grep',
> it's named 'findstr' and supports regular expressions, sub directory
> searches, etc.

As does SPF/PC 5.x

Mickey

0
Reply Mickey 2/3/2005 6:27:50 PM

On Thu, 03 Feb 2005 17:47:53 GMT, Wayne Tilton  
<Wayne_Tilton@NoSpam.Yahoo.com> wrote:

>
> Windows has a perfectly good grep command, it's just not named 'grep',
> it's named 'findstr' and supports regular expressions, sub directory
> searches, etc.
>
> Wayne

Thank you! I just did a help findstr and it looks promising.
Guess there are some goodies buried under the cutsie WE KNOW YOU WANT  
THIS  stuff


-- 
Fritz Oppliger
0
Reply Fritz 2/4/2005 3:37:03 AM

Chris wrote:
 
>       filename = linein('myDir.txt')
>       do while lines(filename)>0
>          if pos('2F'x,linein(filename)) > 0 then say filename
>       end
>    (** Warning ** This is an Untested Code Snippet **)

Add /**/ call lineout filename /**/ otherwise you could run out
of file handles.  Probably something like...

   if SysFileSearch( '2F'x, filename, 'LINES.' ) = 0 then do
      if sign( LINES.0 ) then say 'gotcha:' filename
   end

....is faster, if you have SysFileSearch.  In that case you also
have SysFileTree( '*.rex', 'REX.', 'FOS' ) for a simple loop:

   do N = 1 to REX.0 ; /* etc., filename is REX.N */ ; end N

                          Bye, Frank

0
Reply Frank 2/4/2005 5:51:59 AM

>> ...
>> How do I search (in Win XP) for specific code in my .rex files?
>> Example: I know I have used %2F before in a program, which one was it?
>> The default Win search mechanisme does not find anything.
>> Wim
> ...
> The problem is that WinXP doesn't
> recognize the .rex extension.
> Lee
> ...

Wow. I never realised that Windows XP's search skips a whole bunch of file
extensions.
Searching the Internet I found this XP 'feature' described at the following
Microsoft URL, along with a number of potential resolutions:

http://support.microsoft.com/default.aspx?scid=KB;EN-US;309173

Regards,
Chris.


0
Reply Chris 2/4/2005 11:26:29 AM

Lee,
Thanks again.
Wim Dirks

"Lee Peedin" <lpeedinREMOVE@UPPERCASEnc.rr.com> schreef in bericht 
news:lu7401p5ndmfa9vugjomfvl0et8vhl1oak@4ax.com...
> Wim,
> Here is my message from June 16, 2004 to the RexxLA concerning this
> issue.  Try it, it does work.
>
> Lee
>
> -----Original Message-----
> From: Rexx Language Association [mailto:REXXLA@lists.psu.edu] On
> Behalf Of Lee Peedin
> Sent: Wednesday, June 16, 2004 8:26 AM
> To: REXXLA@LISTS.PSU.EDU
> Subject: Atten: Windows XP Rexx Users
>
> OK, this is not specific to Rexx, but I think all WinXP users can
> benefit from this information.
>
> Have you ever tried to use the WinXP search files & folders function
> to find a specific string of text in your .rex or .cmd files and did
> not get any results (even though you know that the string exists in
> one or more files)?
>
> It seems that MicroSoft in their infinite wisdom decided to make this
> search feature only work on "certain" extensions known to Windows (and
> .rex is not one of them).
>
> You can edit the registry and set up each extension, but that's a lot
> of work.
>
> Please note: the following information was copied (and corrected) from
> this web address:
> http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=323
>
> So if you want all extensions searched when you're looking for string
> inside files, follow this method:
>
> 1. Click Start > Search > and click Change Preferences.
>
> 2. Click With Indexing Service (for faster local searches).
>
> 3. Click Change Indexing Service Settings (Advanced).
>
> This will bring up the Indexing Service window.
>
> 4. Click  View > Customize.
>
> 5. Place a checkmark next to Console Tree and click OK.
>
> 6. In the left hand pane, right click the entry named Indexing Service
> on Local Machine and choose Properties.
>
> 7. Place a checkmark next to Index files with unknown extensions.
>
> Done.  If the change doesn't take immediate effect, reboot.
>
> Lee
>
>
> On Thu, 3 Feb 2005 11:16:11 +0100, "Wim Dirks" <wimp4u@hotmail.com>
> wrote:
>
>>Just a little bit OT:
>>How do I search (in Win XP) for specific code in my .rex files?
>>Example: I know I have used %2F before in a program, which one was it?
>>The default Win search mechanisme does not find anything.
>>Thanks,
>>Wim Dirks
>>
> 


0
Reply Wim 2/4/2005 12:12:13 PM

In Message-ID:<ctvm55$b5k$1@hercules.btinternet.com>,
"Chris" <c_bartlett@btconnect.com> wrote: 

>>> ...
>>> How do I search (in Win XP) for specific code in my .rex files?
>>> Example: I know I have used %2F before in a program, which one was it?
>>> The default Win search mechanisme does not find anything.
>>> Wim
>> ...
>> The problem is that WinXP doesn't
>> recognize the .rex extension.
>> Lee
>> ...
>
>Wow. I never realised that Windows XP's search skips a whole bunch of file
>extensions.
>Searching the Internet I found this XP 'feature' described at the following
>Microsoft URL, along with a number of potential resolutions:
>
>http://support.microsoft.com/default.aspx?scid=KB;EN-US;309173

     This is a "feature" of Windows indexing.  If you have
indexing turned off, you:

1.  Won't have this problem,
2.  won't have the performance hit of indexing,
3.  won't have the large index file on disk,
4.  won't have information leaked from encrypted files or disks.

     To be (somewhat) fair, you also won't have the speed
improvement of indexing for those few times you're searching for
something that indexing supports.

     To turn off indexing in XP, see
http://www.windowsxpatoz.com/cgi-bin/performance/index.cgi?answer=1036283121&id=1036282433

     (I run Win2K with indexing turned off; I haven't, myself,
tried the technique above in XP.)


-- 
Arthur T. - ar23hur "at" speakeasy "dot" net
Looking for a good MVS systems programmer position
0
Reply Arthur 2/4/2005 4:32:22 PM

On Thu, 3 Feb 2005 10:16:11 UTC, "Wim Dirks" <wimp4u@hotmail.com> 
wrote:

> Just a little bit OT:
> How do I search (in Win XP) for specific code in my .rex files?
> Example: I know I have used %2F before in a program, which one was it?
> The default Win search mechanisme does not find anything.
> 

A text editor like Textpad could do this.

-- 
Jim Backus OS/2 user since 1994
bona fide replies to j <dot> backus <the circle thingy> jita <dot> 
demon <dot> co <dot> uk

0
Reply Jim 2/4/2005 8:01:32 PM

Hi,

Grep and Agent Ransack are great tools, but XP's Search
Companion allegedly has all kinds of amazing capabilities that
are unknown to most users. For instance, searches may be
restricted to certain properties of certain files, such as
document author, page count, etc. And you may use DOS-style
wildcards as well as regular expressions in your searches also.
Searches may also be saved for repeated use. Since many of XP's
searches use the indexing feature, performance should exceed
that of Grep or Agent Ransack.

There's a whole search language available for the XP Search
Companion, but it's not well documented, and I can't be sure
that Microsoft even supports it. There's some documentation for
it in Chapter 12 of "Windows XP Inside Out" by Bott and
Siechert, but I think that a lot of that information may be
incorrect. I just tried to use their examples to find all of my
*.rex files containing the words "parse arg" or "parse var" with
no luck.

So, in short it appears to have a lot of power, but since it's
not well documented, it's not going to be easy to get at that
power. Too bad.

-- 

Bernie Schneider
The individual has always had to struggle to keep from being
overwhelmed
by the tribe. To be your own man is a hard business. If you try
it, you will
be lonely often and sometimes frightened. But no price is too
high to pay
for the privilege of owning yourself.
                                                                
     -- Friedrich Nietzsche --


"Gert van der Kooij" <gert@invalid.nl> wrote in message
news:MPG.1c6c6e6b341d92269897cd@news.xs4all.nl...
> In article <9fj401h25hpumats4n43rus9vutmgg23fi@4ax.com>, Lee
Peedin
> (lpeedinREMOVE@UPPERCASEnc.rr.com) says...
> > There's no reason to pull another 3 party product into the
mix when a
> > simple change to the WinXP search parameters will fix the
issue.
> >
> > I was given the same advice by some Linux gurus in our
office, but
> > chose to find the cause of the issue - not a bandage to
cover it up.
> > Lee
> >
>
> Other products (like Agent Ransack and grep)  allow regular
> expressions and multiple directories. This gives much more
powerfull
> search options then the default XP search option.


0
Reply Bernie 2/4/2005 10:35:07 PM

Hi,

On Fri, 04 Feb 2005 22:35:07 GMT, "Bernie Schneider" <berniegs@prodigy.net> wrote:

>Grep and Agent Ransack are great tools, but XP's Search
>Companion allegedly has all kinds of amazing capabilities that
>are unknown to most users.

>So, in short it appears to have a lot of power, but since it's
>not well documented, it's not going to be easy to get at that
>power. Too bad.

Unfortunately it is also hopeless at finding text/words and possibly only works correctly for text
files, Agent Ransack for one does not have that limitation which is why I use it. It can also search
for regular expressions another major advantage.

My 2 cents worth,
Dennis

---
Dennis Bareis
http://dennisbareis.id.au/index.htm
PPWIZARD: Free HTML Preprocessor (really any text files)
MAKEMSI : Free tool to Create or update MSI installers, MSM, CUB etc.
MSIDIFF : Free tool to Compare or Display MSI, MSM, patches, transforms etc
0
Reply Dennis 2/5/2005 5:59:22 AM

Full information is in MS KB article KB309173 
(http://support.microsoft.com/default.aspx?scid=kb;en-us;309173) Here's the 
bit that helps you:

<quote>
When you search for files that contain text by using the A word or phrase in 
the file search criterion, the search results may not contain files that 
contain the text that you specified. ...

To resolve this problem for other file types, ... you can use the plain text 
filter for a file type. To do this, add a PersistentHandler key under the 
file type key in HKEY_CLASSES_ROOT and set its (Default) string value name 
to the following value:
{5e941d80-bf96-11cd-b579-08002b30bfeb}

For example, to use the text filter provider for .zzz files, the following 
registry setting should exist:
HKEY_CLASSES_ROOT\.zzz\PersistentHandler\(Default) = 
{5e941d80-bf96-11cd-b579-08002b30bfeb}

After you add this value to the registry, you must log off and then log back 
on to make the change take effect.
</quote>


Just replace .zzz with .rex.

---

The technique given by Lee enables all types, and is also documented in 
KB309173. The problem with that soluition is that you now end up searching a 
lot of non-textual files, which make the search slow. The above is a better 
approach for specific extensions.


"Wim Dirks" <wimp4u@hotmail.com> wrote in message 
news:4201f9dd$0$12085$d5255a0c@news.wanadoo.nl...
> Just a little bit OT:
> How do I search (in Win XP) for specific code in my .rex files?
> Example: I know I have used %2F before in a program, which one was it?
> The default Win search mechanisme does not find anything.
> Thanks,
> Wim Dirks
> 


0
Reply Mark 2/11/2005 9:59:23 AM

18 Replies
376 Views

(page loaded in 0.189 seconds)

Similiar Articles:


















7/21/2012 11:01:28 PM


Reply: