Find in files: Finding files NOT matching the search term

Find in files: Finding files NOT matching the search term

17
Basic UserBasic User
17

    Jan 27, 2006#1

    Hello,

    I want to search several open files and list those files which don't match the search term.

    6,602548
    Grand MasterGrand Master
    6,602548

      Re: Finding files NOT matching the search term

      Jan 27, 2006#2

      Like your other question, this can be only done with a macro. The macro searches in every file for the term and closes all files which has the term. After macro execution only the files are opened which do not have the search term. You should save all files before the macro is executed. All files must be real files (not buffers) with a file name.

      InsertMode
      ColumnModeOff
      HexOff
      Loop
      IfNameIs ""
      ExitMacro
      EndIf
      Top
      Find "your search"
      IfFound
      CloseFile
      Else
      "ThisIsTheFirstFileWithoutTheSearchString"
      ExitLoop
      EndIf
      EndLoop
      Loop
      NextWindow
      Top
      Find MatchCase "ThisIsTheFirstFileWithoutTheSearchString"
      IfFound
      Delete
      ExitMacro
      Else
      Find "your search"
      IfFound
      CloseFile
      Else
      NextWindow
      EndIf
      EndIf
      EndLoop

      And again don't forget to enable the macro property Continue if a Find with Replace not found.

        Re: Finding files NOT matching the search term

        May 31, 2007#3

        With UltraEdit v13.00 and UEStudio v6.20 (or any later/higher version) such a search is possible.

        There is the Find In Files option Match Files if string is not found.
        Best regards from an UC/UE/UES for Windows user from Austria