[TC 11.51] Traverse filters in Copy differ from Search
Posted: 2025-04-06, 00:09 UTC
When searching for files in C:\test using this search text:
(traverse filter: \dir1\dir2\dir3\, search for files named "test.txt")
The results correctly show:
C:\test\test.txt
C:\test\dir1\dir2\dir3\test.txt
However, when selecting all files and folders in C:\test and copying them to D:\test with "Only files of this type" set to the same filter:
Only C:\test\test.txt is copied. The file in the subdirectory (C:\test\dir1\dir2\dir3\test.txt) is excluded, unlike the search behavior. I expect the copy operation to match the search results and include both files.
To make copy work as intended, I need to use a more verbose expression like:
(It is necessary to include all intermediate directories, and to exclude all files in those intermediate directories)
Another inconsistency:
In search, if a traverse filter starts with a backslash, it applies to subdirectories directly in the search location only, not to subdirectories of them. For example:
1. subdir1\ or subdir1\subdir2\ are matched against subdirectories anywhere below the search location.
2. \subdir1\ or \subdir1\subdir2\ or \ are matched against subdirectories directly in the search location only, not in its subdirectories.
But in copy, when specifying a traverse filter in "Only files of this type", there is no difference. Using subdir1\ or \**\subdir1\ does the same as \subdir1\. This inconsistency makes the copy behavior less predictable.
Code: Select all
\dir1\dir2\dir3\ test.txt
The results correctly show:
C:\test\test.txt
C:\test\dir1\dir2\dir3\test.txt
However, when selecting all files and folders in C:\test and copying them to D:\test with "Only files of this type" set to the same filter:
Code: Select all
\dir1\dir2\dir3\ test.txt
To make copy work as intended, I need to use a more verbose expression like:
Code: Select all
\dir1\ \dir1\dir2\ \dir1\dir2\dir3\ \test.txt \dir1\dir2\dir3\test.txt
Another inconsistency:
In search, if a traverse filter starts with a backslash, it applies to subdirectories directly in the search location only, not to subdirectories of them. For example:
1. subdir1\ or subdir1\subdir2\ are matched against subdirectories anywhere below the search location.
2. \subdir1\ or \subdir1\subdir2\ or \ are matched against subdirectories directly in the search location only, not in its subdirectories.
But in copy, when specifying a traverse filter in "Only files of this type", there is no difference. Using subdir1\ or \**\subdir1\ does the same as \subdir1\. This inconsistency makes the copy behavior less predictable.