Option "Subdirectories to ignore in file search" is ignored on running a Replace in Files (fixed)

Option "Subdirectories to ignore in file search" is ignored on running a Replace in Files (fixed)

27
Basic UserBasic User
27

    Aug 02, 2019#1

    Hi,

    I am using UltraEdit v26.10 on Windows 10.
    I want to replace terms in text files in a folder without specific subfolders:

    2019-08-02_shot_002.png (48.22KiB)

    But the subfolders are *not* ignored and UE replaces the terms in text files within these folders, too!

    Therefore: why?

    Thanks!
    mtemp

    6,686585
    Grand MasterGrand Master
    6,686585

      Aug 03, 2019#2

      This issue is caused by a bug as I found out after reading your post with Replace in Files and Find in Files tests done with several versions of UltraEdit for Windows.

      I have just sent an issue report email to IDM support with following subject and content containing also the workaround for this issue in last but one paragraph.

      UE/UES - Specified subdirectories to ignore not ignored on running Replace in Files

      There is an issue with option Subdirectories to ignore in search on being used with Replace in Files which exists according to my tests with several versions of UltraEdit for Windows since v21.10.0.1021. I could not reproduce this issue with UE v21.00.0.1033, v20.00.0.156 and v19.10.0.1012 using the steps below. The issue was reproducible with v21.00.0.1033 and some other versions up to UE v26.10.0.72.

      The issue is that the directory names entered in edit field of option Subdirectories to ignore in search on tab Replace in Files of the floating Find and Replace window opened by pressing Ctrl+Shift+R are not taken into account on running the Replace in Files.

      This issue can be reproduced as follows:
      1. Extract attached RAR file ignore_subdirectories_replace_in_files.rar to directory C:\Temp.
      2. Start UltraEdit with default settings.
      3. Press Ctrl+Shift+R to open floating Find and Replace window with tab Replace in Files selected. That is important as it turned out.
      4. Enter as search string the two words: search term
        Press TAB and enter as replace string the two words: replace term
        Files listed should be selected for option In, otherwise press Alt+L.
        Press Alt+Y and enter *.txt for option In files/types.
        Press TAB and enter C:\Temp\Test\ for option Directory.
      5. Click on gearwheel button to get displayed the advanced options.
        None of these options should be checked by default.
      6. Check the options Search subdirectories (Alt+B), List changed files (Alt+N), Ignore hidden subdirectories (Alt+G) and press TAB to set input focus into edit field of Subdirectories to ignore in search.
        Copy and paste or enter now the following three subdirectory names:

        sub-folder 1;other_subfolder;01_subfolder_with-number

        See also attached image ignore_subdirectories_replace_in_files.png.
      7. Press Alt+A to activate Replace all to run Replace in Files.
      The directory C:\Temp\Test\ contains six *.txt files all with just the two words: search term. The Replace in Files with the used options should
      modify just C:\Temp\Test\File1.txt and C:\Temp\Test\replace_folder\File4.txt and ignore all other four files. File6.txt in hidden subdirectory is indeed ignored, but not the files File2.txt, File3.txt and File5.txt.

      The reason is that the three directory names entered for option Subdirectories to ignore in search are not taken over from dialog window before running Replace in Files.

      There is a simple workaround for this issue. After the first six steps the tab Find in Files is selected with mouse, and without doing anything on this tab, the tab Replace in Files is selected again. Executing now Replace all results in subdirectories to ignore being really ignored.

      This issue does not exist with tab Find in Files according to my tests. The entered subdirectories are always taken over on execution of Find in Files.
      ignore_subdirectories_replace_in_files.rar (739 Bytes)   0
      RAR file containing the test directory with the five subdirectories and the six files.
      ignore_subdirectories_replace_in_files.png (10.63KiB)
      Screenshot of Replace in Files window before executing the command.
      Best regards from an UC/UE/UES for Windows user from Austria

      27
      Basic UserBasic User
      27

        Aug 05, 2019#3

        Wow, thank you for your extensive support! Thought it wasn't a bug ...

        Best regards from Deutschland! :)

        6,686585
        Grand MasterGrand Master
        6,686585

          Sep 10, 2019#4

          This bug is fixed with UltraEdit for Windows v26.20.0.01 and with UEStudio v19.10.0.46.
          Best regards from an UC/UE/UES for Windows user from Austria