Return just list of files

Return just list of files

4
NewbieNewbie
4

    Sep 19, 2005#1

    I would like to perform a "Find in Files" with all the parameters Find, In Files/Types, Directory, but for the output to only show the names (path) of the files which contain matches.

    I do not want the usual output, e.g.:

    Code: Select all

    ----------------------------------------
    Find 'STDHDG01' in 'E:\YM\September 2005\Sqr\SQR\XRFWIN.SQR' :
    E:\YM\September 2005\Sqr\SQR\XRFWIN.SQR(59):    #include 'stdhdg01.sqc'
    Found 'STDHDG01' 1 time(s).
    ----------------------------------------
    I want something like:

    Code: Select all

    ----------------------------------------
    Find 'STDHDG01' in folder 'E:\YM\September 2005\Sqr\SQR' :
    E:\YM\September 2005\Sqr\SQR\XRFWIN.SQR
    E:\YM\September 2005\Sqr\SQR\XRFRCPN.SQR
    E:\YM\September 2005\Sqr\SQR\XRFRCFL.SQR
    Found 'STDHDG01' 3 time(s).
    ----------------------------------------
    Is this possible?

    TIA.
    YourMum

    6,688586
    Grand MasterGrand Master
    6,688586

      Sep 20, 2005#2

      You will not get this result directly. But you can activate the "Result to Edit Window" option and run this macro to get only the filenames with path and the number of files found for the specified search string at bottom of the result.

      InsertMode
      ColumnModeOff
      HexOff
      UnixReOff
      Top
      Find RegExp "%Find *^p"
      Replace All ""
      Find RegExp "%Found *^p"
      Replace All ""
      Find RegExp "/[0-9]+: *$"
      Replace All ""
      Find "----------------------------------------^p"
      Replace All ""
      SelectToBottom
      StartSelect
      Key UP ARROW
      SortAsc RemoveDup 1 -1 0 0 0 0 0 0
      EndSelect
      Find RegExp "[0-9]+ time(s). (^(*^))"
      Replace All "in ^1"
      UnixReOn

      Remove the last red command, if you use regular expression in UltraEdit style by default instead of Unix style - see Advanced - Configuration - Find - Unix style Regular Expressions. UnixReOn/UnixReOff modifies this setting.
      Best regards from an UC/UE/UES for Windows user from Austria

      4
      NewbieNewbie
      4

        Sep 20, 2005#3

        Wowsers. Thanks. That did what I wanted. Thanks very much, Mofi.

        YM