Loading ...
Sorry, an error occurred while loading the content.
 

Re: [NTS] Findstr

Expand Messages
  • Alec Burgess
    Nice find Hugo: I just checked - its on Win2K as well (that makes sense) It doesn t seem to be part of Win98 but Google findstr+Win98 locates:
    Message 1 of 3 , Sep 8, 2002
      Nice find Hugo:

      I just checked - its on Win2K as well (that makes sense)
      It doesn't seem to be part of Win98 but Google findstr+Win98 locates:
      http://www24.brinkster.com/alexweir/WFindStr/ :
      WfindStr - (29-06) a Freeware- Shareware Rapid Text Search for Windows
      which piggy-backs on the FindStr.exe windows utility - handles h....

      Regards ... Alec
      ----- Original Message -----
      From: "hugo_paulissen" <h.paulissen@...>
      To: <ntb-scripts@yahoogroups.com>
      Sent: 08 September, 2002 19:59
      Subject: [NTS] Findstr


      > Jody,
      >
      > I've read some documents that go with my new Windows XP. It seems
      > that you can do a lot with FINDSTR.
      >
      > I can imagine that you can use it to do the boolean search you're
      > after. Here is a small clip (rough demo) to show that you can
      > generate a list of files that is used as input for a next search.
      >
      > I cannot say anything about performance...
      >
      > ^!Continue This clip will give you info on the syntax of findstr,
      > or "mimics" a BOOLEAN search using the same command...^%NL%I have put
      > nothing fancy in the clip, it is just a demonstration of how you
      > could perform BOOLEAN searches.
      > ^!Menu File/New
      > ^!GoTo ^?[What do you want to do?==Get help on
      > FINDSTR^=INFO|_Search^=FINDSTR]
      > :INFO
      > ^$GetDosOutput("findstr /?")$
      > ^!GoTo EXIT
      > :FINDSTR
      > ^!Set %find%=^?[Find=paulissen]
      > ^!Set %findnot%=^?[Findnot=hugo]
      > ^!Set %where%=^?[Where?="C:\Documents and Settings\Hugo\My
      > Documents\*.txt"]
      > ^!Set %found%=^$GetDosOutput("findstr /S /M "^%find%" "^%where%"")$
      > ^!IfTrue ^$IsEmpty(^%found%)$ NOTFOUND
      > ^%found%
      > ^!Save AS list^%find%not^%findnot%.txt
      > ^!Set %list%=^**
      > ^!SetListDelimiter ^P
      > ^!SetArray %not%=^$GetDosOutput("findstr /S /M /f:"^%list%" "^%
      > findnot%"")$
      > ^!Set %item%=^%not0%
      > ^!IfTrue ^$IsEmpty(^%item%)$ END
      > :NEWLIST
      > ^!Dec %item%
      > ^!If ^%item%=0 EXIT
      > ^!Replace "^%not^%item%%^%NL%" >> "" WAS
      > ^!IfError GoTo EXIT
      > ^!GoTo NEWLIST
      > :NOTFOUND
      > ^!INFO As you have noticed, ^%find% could not be found...
      > ^!GoTo EXIT
      > :END
      > ^!INFO As you have noticed, ^%findnot% could not be found in the list
      > of documents where ^%find% was found.
      > :EXIT
      > ^!INFO Do whatever you want now. I don't know if FINDSTR is available
      > in all windows-versions...
      >
      > Hugo
      >
      >
      > ------------------------ Yahoo! Groups
      Sponsor ---------------------~-->
      > Sell a Home with Ease!
      > http://us.click.yahoo.com/SrPZMC/kTmEAA/MVfIAA/NhFolB/TM
      > ---------------------------------------------------------------------~
      ->
      >
      > ntb-scripts-unsubscribe@yahoogroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to
      http://docs.yahoo.com/info/terms/
      >
      >
    • h.paulissen@facburfdcw.unimaas.nl
      Jody, The option /M gives filenames only, but if you use other options (in the final search I d say), you can do what you want... Hugo
      Message 2 of 3 , Sep 9, 2002
        Jody,

        The option /M gives filenames only, but if you use other options (in the
        final search I'd say), you can do what you want...

        Hugo

        > -----Original Message-----
        > From: Jody [mailto:av1611@...]
        > Sent: Monday, September 09, 2002 7:24 AM
        > To: ntb-scripts@yahoogroups.com
        > Subject: Re: [NTS] Findstr
        >
        >
        > Hi Hugo,
        >
        > Thanks for thinking of me. I need to use something that returns
        > lines from a file(s) though, not the whole file. Agent Ransack
        > does that. Another search program (command-line drive) that does
        > it is "grep" if you are familiar with it. I haven't used it much
        > so I am not that familiar with what all it can do.
        >
        > >I've read some documents that go with my new Windows XP. It seems
        > >that you can do a lot with FINDSTR.
        >
        >
        > Happy Script'n!
        > Jody Adair
        >
        > UnSubscribe, Options
        > mailto:ntb-Scripts-UnSubscribe@yahoogroups.com
        > http://groups.yahoo.com/group/ntb-clipclass
        >
        > The NoteTabbers Assistant Page
        > http://www.notetab.net
        >
        >
        > ------------------------ Yahoo! Groups Sponsor
        > ---------------------~-->
        > Looking for a more powerful website? Try GeoCities for $8.95
        > per month.
        > Register your domain name (http://your-name.com). More
        > storage! No ads!
        > http://geocities.yahoo.com/ps/info
        > http://us.click.yahoo.com/aHOo4D/KJoEAA/MVfIAA/NhFolB/TM
        > --------------------------------------------------------------
        > -------~->
        >
        > ntb-scripts-unsubscribe@yahoogroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to
        > http://docs.yahoo.com/info/terms/
        >
        >
      • Jody
        Hi Hugo, Thanks, but I do not want files, nor file names. I want lines only, at least until after I get the lines returned. ;) Each line comes back with the
        Message 3 of 3 , Sep 9, 2002
          Hi Hugo,

          Thanks, but I do not want files, nor file names. I want lines
          only, at least until after I get the lines returned. ;) Each line
          comes back with the path to the file above the criteria found, so
          if I want to open the file, it opens it at the point in the file
          that the criteria was found a few lines down from the top and it
          is selected. If you were to download my AV1611 Library and Agent
          Ransack (separate download) you will see what I am talking about.
          I have not added the "but not" feature yet... due to time.

          http://www.notetab.net/zip/av1611.zip (about 1.3MB I think)

          >The option /M gives filenames only, but if you use other options
          >(in the final search I'd say), you can do what you want...
          >
          >> I need to use something that returns lines from a file(s)
          >> though, not the whole file. Agent Ransack does that. Another
          >> search program (command-line driven) that does it is "grep" if
          >> you are familiar with it. I haven't used it much so I am not
          >> that familiar with what all it can do.

          Happy Script'n!
          Jody Adair

          UnSubscribe, Options
          mailto:ntb-Scripts-UnSubscribe@yahoogroups.com
          http://groups.yahoo.com/group/ntb-clipclass

          The NoteTabbers Assistant Page
          http://www.notetab.net
        Your message has been successfully submitted and would be delivered to recipients shortly.