How to stop / abort / cancel Find in Files?

How to stop / abort / cancel Find in Files?

80
Advanced UserAdvanced User
80

    Jan 25, 2008#1

    I love that find in files now runs in the background, but I started a particularly long search and want to stop it. How do I do this?

    Thanks.

    262
    MasterMaster
    262

      Jan 25, 2008#2

      When the Find in Files search is running the menu item Search - Find In Files changes to Search - Cancel Find In Files.

      80
      Advanced UserAdvanced User
      80

        Jan 25, 2008#3

        Thanks.

        13
        Basic UserBasic User
        13

          Abort search in files and folders

          Jul 08, 2012#4

          Hi all

          Recently in UE I started a search in files (including subfolders) by a stupid mistake and ended up getting more than 20k results in 4k of files. Not just the searching took ages, even the displaying took quite a long time :lol:

          Is there any keyboard shortcut where I can abort such a mistaken search?

          Greetz
          FoTo50

          6,688587
          Grand MasterGrand Master
          6,688587

            Re: Abort search in files and folders

            Jul 08, 2012#5

            Yes, press the hotkey used to open Find In Files dialog. In case you have opened the Find In Files dialog via click on menu item Find in Files in menu Search or by clicking on the symbol of the command in the toolbar, click on menu item or symbol again. If a Find/Replace in Files is running, the menu items Find in Files and Replace in Files both change to Cancel Find/Replace in Files in menu Search to indicate that the background process of finding/replacing in files can be canceled by executing the command again. That a Find in Files is running can be seen in prompt area on left side of the status bar at bottom of the main window. This area shows the standard text For Help, press F1 after canceling the background thread.

            3
            NewbieNewbie
            3

              Dec 21, 2012#6

              If I start a really time consuming search that returns lots of result (>20K), I cannot interrupt it. If I try to click on the Search menu item in order to select Cancel Find in Files, there is no response until the search completes. I really need a real interrupt. Any ideas?
              thanks
              E

              6,688587
              Grand MasterGrand Master
              6,688587

                Dec 21, 2012#7

                edwardd, there is no other method than executing Cancel Find/Replace in Files to stop Find in Files.

                I don't see a problem. I'm using UE v18.20.0.1028 on Windows XP SP3 x86 and UltraEdit cancels the search respectively write to output window within 3 seconds.

                I used following options for verification of cancel process:

                Find What: body
                Search In: Files Listed
                In Files/Types: *.html
                Directory: root directory of the local copy of a website with in total 1046 HTML files

                Match Whole Word Only: not checked
                Match Case: checked
                Results to Edit Window: not checked
                Regular Expressions: UltraEdit: not checked

                Display lines that do not match: not checked
                Match files if string is not found: not checked
                Use Encoding: not checked

                Subdirectories to ignore in search: none
                File names/extensions to ignore in search: none

                Search Subdirectories: checked
                Ignore hidden Subdirectories: not checked
                Open matching files: not checked

                Perhaps the behavior you complain about with stopping Find in Files taking longer to occur happens only under some conditions. Therefore it would be good if you post which parameters you use for the Find in Files which does not cancel within a few seconds.

                From what I could see and what makes sense from a programmers point of view is that the thread running the Find in Files checks on the cancel signal from UltraEdit main task only before the thread continues with the search on next file. There is no check on cancel while a search within a file is in progress, most likely because all the find functions are standard subroutines not designed at all for receiving signals as threads. So if you use a Find in Files which finds lots of lines in a very large file with hundred thousands or millions of lines, you have to wait until this file is completely processed and the find function returns, so that main task of the thread can evaluate the cancel signal and terminate.

                3
                NewbieNewbie
                3

                  Jan 14, 2013#8

                  All my search settings are the same except one. I think it may have to do with this:
                  Results to Edit Window: CHECKED

                  It cannot be interrupted while it is trying to write the results to the UI. I also noticed that once the search is complete, there is some secondary process that happens, during which time the app is frozen and the screen flashes several times. Once it's done with whatever it's doing, I can examine the results without a problem.

                  Thanks,

                  ed