How to open found files that don't contain the search string?

How to open found files that don't contain the search string?

9
NewbieNewbie
9

    Jan 14, 2010#1

    Using UltraEdit 15.20.0.1022 I can use find-in-files to locate files that _don't_ contain the search string. The list of files appears in the output window but I can't open the files by double-clicking them. If I search for files that _do_ contain the search string then I can open them by double-clicking on one of the corresponding lines containing the string in the output window.

    Any way to make this work?

    - Britt

    6,682583
    Grand MasterGrand Master
    6,682583

      Jan 15, 2010#2

      As IDM introduced this feature I suggested to make it also possible to open the found files. Unfortunately it looks like I was the only user which wanted that until now. I hope more users are requesting this enhancement by email from IDM. The same problem exists when running a Find In Files with an empty search string to get just a list of files.

      The problem is that normally after a file name there is either (line number): or /line number: appended to the name of a file. UltraEdit requires at least the : to interpret a line as a line with a file name.

      You can run your search with option Results to Edit Window and right click on every file name and click on first menu item to open the file.

      If the configuration setting Show status information in output window is not enabled (by default it is enabled), you could also run the following script I quickly have written to simply append a : at end of every line in the output window which enables you to open the files with a double click.

      UltraEdit.selectClipboard(9);
      UltraEdit.outputWindow.copy();
      UltraEdit.outputWindow.clear();
      var sOutputContent = UltraEdit.clipboardContent;
      UltraEdit.clearClipboard();
      UltraEdit.selectClipboard(0);
      var sNewOutput = sOutputContent.replace(/\r\n/g,":\r\n");
      UltraEdit.outputWindow.write(sNewOutput);

      If the configuration setting Show status information in output window is enabled the execution of the script above results in overwriting the current output window content with the script status information on start of the script and therefore the script can't get anymore the output of the Find In Files command.
      Best regards from an UC/UE/UES for Windows user from Austria

      9
      NewbieNewbie
      9

        Jan 15, 2010#3

        Thank you for those two solutions. I had earlier tried redirecting the find results to an edit window but I didn't think of right-clicking on a file name to see the Open option.

        - Britt