+-Search in @list.txt: directory level wrong
Moderators: Hacker, petermad, Stefan2, white
+-Search in @list.txt: directory level wrong
* Start Search
* Search for: <empty>
* Search in: c:\temp\
* Search in subdirectories: Start with "current dir only", then 1 level deep, then 2 level deep. Remember the results
Now put "c:\temp\" in a new file c:\list.txt
Use this file in the Search in field.
* Search in: @c:\list.txt
* Search in subdirectories: Start with "current dir only", then 1 level deep, then 2 level deep. Compare with previous results.
When the Search in folder is put in a file, the search is performed 1 level less deep. When searching with option "current dir only", the search results always mentions "1 files and 1 directories found" and only the directory itself is listed.
Tested TC8.50rc1 32bit and TC8.01 32 bit. Same results.
* Search for: <empty>
* Search in: c:\temp\
* Search in subdirectories: Start with "current dir only", then 1 level deep, then 2 level deep. Remember the results
Now put "c:\temp\" in a new file c:\list.txt
Use this file in the Search in field.
* Search in: @c:\list.txt
* Search in subdirectories: Start with "current dir only", then 1 level deep, then 2 level deep. Compare with previous results.
When the Search in folder is put in a file, the search is performed 1 level less deep. When searching with option "current dir only", the search results always mentions "1 files and 1 directories found" and only the directory itself is listed.
Tested TC8.50rc1 32bit and TC8.01 32 bit. Same results.
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
This is a question of definition. Currently when you choose "only current directory", it finds just
C:\temp
itself. This is useful when you just want to show the files/folders inside the search list itself.
When you choose "1 level", it finds all files/folders directly inside C:\temp.
Therefore I think that the current solution is better.
C:\temp
itself. This is useful when you just want to show the files/folders inside the search list itself.
When you choose "1 level", it finds all files/folders directly inside C:\temp.
Therefore I think that the current solution is better.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
OK. But the results say "1 files and 1 directories found", but only 1 directory is found and listed and no file!ghisler(Author) wrote:This is a question of definition. Currently when you choose "only current directory", it finds just
C:\temp
itself. This is useful when you just want to show the files/folders inside the search list itself.
Seems there are more things wrong, see the following tests.
1. create folder c:\temp\z2
2. In file c:\temp\list.txt:
c:\temp\<^z2$
3. Search in @c:\temp\list.txt
4. Search in current dir only. Result:
c:\temp
5. Search 1 level deep. Result:
c:\temp\z2
--------
1. In file c:\temp\list.txt:
c:\
2. Go to c:\ and start Find files
3. Search in @c:\temp\list.txt
4. Search in current dir only. Result:
No files found
--------
1. In file c:\temp\list.txt:
c:\
2. Go to other folder than c:\ and start Find files
3. Search in @c:\temp\list.txt
4. Search in current dir only. Result:
c:
1. create folder c:\temp\z2
2. In file c:\temp\list.txt:
c:\temp\<^z2$
3. Search in @c:\temp\list.txt
4. Search in current dir only. Result:
c:\temp
5. Search 1 level deep. Result:
c:\temp\z2
--------
1. In file c:\temp\list.txt:
c:\
2. Go to c:\ and start Find files
3. Search in @c:\temp\list.txt
4. Search in current dir only. Result:
No files found
--------
1. In file c:\temp\list.txt:
c:\
2. Go to other folder than c:\ and start Find files
3. Search in @c:\temp\list.txt
4. Search in current dir only. Result:
c:
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
These options are not supported. It's not determined what will happen when you use them.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Is this going to be fixed?white wrote:But the results say "1 files and 1 directories found", but only 1 directory is found and listed and no file!
Well having the following file containing the folders to be searched looks normal to me.ghisler(Author) wrote:These options are not supported. It's not determined what will happen when you use them.
Code: Select all
c:\
d:\
e:\folder\
After testing I really find this undocumented feature very user unfriendly. In case of a list file the option "search current dir only" means something entirely different. It is not a first level search which results are extended when a higher level is chosen. Level 1 becomes base level and "current dir only" means disable search ("search for" field is ignored) and load list from file (check for existence of file or folder only).ghisler(Author) wrote:This is a question of definition. Currently when you choose "only current directory", it finds just
C:\temp
itself. This is useful when you just want to show the files/folders inside the search list itself.
When you choose "1 level", it finds all files/folders directly inside C:\temp.
Therefore I think that the current solution is better.
I hope you will consider the following suggestion. In my opinion this will make it much more clear for the user and much easier to document.
I suggest to use a separate option to load the list file and let "current dir only" be the base search level like when doing a normal search. The new option could be yet another checkbox, or an extra option named "no search (load list)" in the search in subdirectories dropdown list, or perhaps some signal in the Search in field (for example using double @ to load list: @@c:\path\filelist.txt).
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Yes, of course.Is this going to be fixed?But the results say "1 files and 1 directories found", but only 1 directory is found and listed and no file!
Searching c:\ in the list will also be fixed - TC was using FindFirstFile to determine whether the path exists, but this doesn't work with drives. I will use GetDriveType.
However, c:\temp\<^z2$ will not be handled differently when searching in the current folder only. That's what I meant with "not supported" - searching the current path only AND specifying a filter doesn't work together, it's contradicting.
No it doesn't! When you put c:\path in the "Search in" field, then TC searches in this folder only when you use that option.After testing I really find this undocumented feature very user unfriendly. In case of a list file the option "search current dir only" means something entirely different.
When you put @c:\path\list inside, then this is the container, so TC will search this container only - not go inside the items of this container.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
To me, search "current dir only" sounds completely different than search in a file. Furthermore following your logic, a level 1 search should search the container AND 1 level deep in found folders. This is not the case. The folders in the file are the base of the search. It is also presented this way in the help text.ghisler(Author) wrote:No it doesn't! When you put c:\path in the "Search in" field, then TC searches in this folder only when you use that option.After testing I really find this undocumented feature very user unfriendly. In case of a list file the option "search current dir only" means something entirely different.
When you put @c:\path\list inside, then this is the container, so TC will search this container only - not go inside the items of this container.
The question is is the current behavior understandable and intuitive for the user. I assume you added this functionality for the user to be used. Don't you agree that my suggestion makes the functionality much more clear and therefor more accessible?
Thanks for fixing the other issues.
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Well, many users may have saved searches with N levels depth, and it would be a bad idea to change that now after so many years.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
The following was changed in RC2:
- c:\ will be found now
- duplicate reporting of folders as files+folders fixed
- c:\ will be found now
- duplicate reporting of folders as files+folders fixed
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Tested OK using TC8.50rc2 32bit and 64bit.HISTORY.TXT wrote:28.01.14 Fixed: Search function, use list file @c:\path\file.txt -> reported also found files (e.g. 1 file and 1 folder instead of just 1 folder) when searching only current dir (32/64)
The root folders now are found and presented as files instead of folders.HISTORY.TXT wrote:28.01.14 Fixed: Search function, use list file @c:\path\file.txt -> drive root like c:\ not found when searching only current dir (32/64)
It only concerns searching using a list file, which was added less than 2 years ago. And you don't have to change the way it is stored in the ini file. I'm not suggesting to change functionality, only user interface. A saved search with list file and search level 0 could be presented in Total Commander as a list file and option "no search (load list)". A saved search with list file and search level 1 could be presented in Total Commander as a list file and search in current dir only. Etc.ghisler(Author) wrote:Well, many users may have saved searches with N levels depth, and it would be a bad idea to change that now after so many years.
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
NOT confirmed, they appear as folders here...The root folders now are found and presented as files instead of folders.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Search_results_displayed_wrongly.pngghisler(Author) wrote:NOT confirmed, they appear as folders here...The root folders now are found and presented as files instead of folders.
Search_results_in_file_panel_displayed_wrongly.png
Using TC8.50rc2 32bit and Windows XP.
...
Got good results now too.
Search_results_displayed_correctly.png
Search_results_in_file_panel_displayed_correctly.png
Seems to work correct when using Alt+I followed by Alt+S.
Pressing Alt+S one or more times -> wrong results.
Pressing Alt+I, Alt+S -> correct results again.
Last edited by white on 2014-04-30, 21:18 UTC, edited 1 time in total.