1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How do I - ffind - with multiple items

Discussion in 'Support' started by jimklein, May 20, 2011.

  1. jimklein

    Joined:
    Dec 24, 2008
    Messages:
    21
    Likes Received:
    0
    Is there a way to do multi-searches using ffind?

    Something like:

    ffind /t"os=vista64" && "servicepack=1" *.txt

    (on multiple lines within the same file)

    Thanks,
    Jim
     
  2. oph

    oph

    Joined:
    Jun 28, 2008
    Messages:
    25
    Likes Received:
    0
  3. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,040
    Likes Received:
    84
    Only if they're on the same line (insert a * between the strings), or if you can do it with a regular expression (/E"...").
     
  4. jimklein

    Joined:
    Dec 24, 2008
    Messages:
    21
    Likes Received:
    0
  5. jimklein

    Joined:
    Dec 24, 2008
    Messages:
    21
    Likes Received:
    0
    Yea - I'd really like it to do finds across multiple lines.

    Feature request? (& thanks)

    Jim Klein
     
  6. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,078
    Likes Received:
    30
    |---Quote (Originally by jimklein)---
    |Is there a way to do multi-searches using ffind?
    |
    |Something like:
    |
    |ffind /t"os=vista64" && "servicepack=1" *.txt
    |---End Quote---

    This (kludge) seems effective to find batch files containing both "foo" and
    "for". For two search strings, an alias might be appropriate. For more, you
    could write a batch file to compose the necessary command line.

    v:\> do file in /p ffind /b /t"foo" *.bat;*.btm ( ffind /b /t"for" %file )
    V:\cursor01.btm
    V:\dotest2.btm
    V:\losserror.btm
     
  7. samintz

    samintz Scott Mintz

    Joined:
    May 20, 2008
    Messages:
    1,201
    Likes Received:
    11
    Try

    ffind /v /e"os=vista64|servicepack=1" *.txt

    -Scott

    jimklein <> wrote on 05/20/2011 02:36:14 PM:


     
  8. jimklein

    Joined:
    Dec 24, 2008
    Messages:
    21
    Likes Received:
    0

    Not perfect - but it'll work!!!

    Thanks!
    Jim
     
  9. Jim Cook

    Joined:
    May 20, 2008
    Messages:
    604
    Likes Received:
    0
    How about something like ffind /t"os=vista64" *.txt | ffind /t"servicepack=1"

    Sent from Cookie's iPhone
    Jim Cook

    On May 20, 2011, at 12:32, jimklein <> wrote:


     
  10. Jim Cook

    Joined:
    May 20, 2008
    Messages:
    604
    Likes Received:
    0
    Sorry. My suggestion only works if you get some surrounding lines as well.

    Sent from Cookie's iPhone
    Jim Cook

    On May 20, 2011, at 12:32, jimklein <> wrote:


     
  11. oph

    oph

    Joined:
    Jun 28, 2008
    Messages:
    25
    Likes Received:
    0

Share This Page