Folder name search
Moderators: XnTriq, helmut, xnview, Dreamer
-
- Posts: 19
- Joined: Sat Feb 23, 2019 3:59 pm
Folder name search
Hello there,
I was trying to use the search function to find some folders until I realized... it's only for files? Or do I miss something? Thought it would come handy for handling the whole folder collection but I was wrong I guess
Is this a planned function? Found some others threads a few years old, which describe the same problem..
-Rhea-
I was trying to use the search function to find some folders until I realized... it's only for files? Or do I miss something? Thought it would come handy for handling the whole folder collection but I was wrong I guess
Is this a planned function? Found some others threads a few years old, which describe the same problem..
-Rhea-
-
- Author of XnView
- Posts: 44936
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
-
- Posts: 19
- Joined: Sat Feb 23, 2019 3:59 pm
Re: Folder name search
Any news on the function?
-
- Posts: 39
- Joined: Tue Aug 23, 2022 3:30 pm
Re: Folder name search
Hi!
Any news on the function?
Any news on the function?
-
- XnThusiast
- Posts: 1410
- Joined: Tue Sep 27, 2016 8:18 am
- Location: France
Re: Folder name search
Since V0. 96 1, "Pathname" Is available in the search function, with some different operators ( is, is not, contains, ...)
I think that "Use catalog" option will increase search speed
I think that "Use catalog" option will increase search speed
Catalogage avec XnviewMP : https://orchisere.fr/logiciels/html/xnviewmpintro.htm
Tutoriel exiftool : https://orchisere.fr/logiciels/html/exiftool.htm
Tutoriel exiftool : https://orchisere.fr/logiciels/html/exiftool.htm
-
- Posts: 8705
- Joined: Sun Oct 12, 2003 6:47 pm
- Location: Frankfurt, Germany
Re: Folder name search
In XnView MP 1.02 I've just tried out searching for folders with a specific name. From what I can see the current search for "Pathname" is a start but the way it works it's not suitable for searching for folders.
Preparation/Note:
For searching for folders you have to activate "Recurse through subfolders". If you don't activate this checkbox the whole search doesn't make sense because current folder will be searched, only.
Some problems that I see:
Summary
Above I've listed just some problems/limitations of the search criteria "Pathname" that I see - I guess there are many more. Search criteria "Pathname" makes sense for including and excluding specific paths but for searching for folders with specific names it's useless.
My suggestions:
Preparation/Note:
For searching for folders you have to activate "Recurse through subfolders". If you don't activate this checkbox the whole search doesn't make sense because current folder will be searched, only.
Some problems that I see:
- If you specify "Programs" as pathname, nothing will be found unless you change the comparator "is" to comparator "contains". Reason is that the full pathname is compared with your search text and "C:\Programs" doesn't equal to "Programs". But then, not only "Programs" folder is found but all subfolders are found, too, because they also contain "Programs" (e.g. "C:\Programs\XnView").
- If you search for folders with a specific name "PDF", folders with this name will be found but also folders including files containing "PDF" (e.g. "C:\Programs\java\PDFconstants.java").
- If you search for folders with a specific name (e.g. "PDF"), all folders with this name and all subfolders will be listed.
- If add a backslash to your search name (e.g. "\PDF") nothing will be found.
Summary
Above I've listed just some problems/limitations of the search criteria "Pathname" that I see - I guess there are many more. Search criteria "Pathname" makes sense for including and excluding specific paths but for searching for folders with specific names it's useless.
My suggestions:
- Add a search option "Folder" that searches for folders with that specific name.
- Make search criteria "Pathname" search the path without filename (not: path with filename)
-
- XnThusiast
- Posts: 1410
- Joined: Tue Sep 27, 2016 8:18 am
- Location: France
Re: Folder name search
I'm waiting to hear if Pierre can develop Helmut's excellent suggestions, otherwise I can offer a workaround with BAT files for Windows.
It's a bit tricky , something like :
1) create a TXT file containing the list of your directories :
cmd
Dir /ad /b /s > C:\XNVIEWMP\DirList.txt
(You will need to renew this file when folders are added)
2) create a BAT file searching for a <word> in this list
@echo off
:aa
set /p word= Enter a word to search
find /i "%word%" "C:\XNVIEWMP\DirList.txt"
goto aa
3) Add a shortcut in your toolbar linked to the bat file ...
It's a bit tricky , something like :
1) create a TXT file containing the list of your directories :
cmd
Dir /ad /b /s > C:\XNVIEWMP\DirList.txt
(You will need to renew this file when folders are added)
2) create a BAT file searching for a <word> in this list
@echo off
:aa
set /p word= Enter a word to search
find /i "%word%" "C:\XNVIEWMP\DirList.txt"
goto aa
3) Add a shortcut in your toolbar linked to the bat file ...
Catalogage avec XnviewMP : https://orchisere.fr/logiciels/html/xnviewmpintro.htm
Tutoriel exiftool : https://orchisere.fr/logiciels/html/exiftool.htm
Tutoriel exiftool : https://orchisere.fr/logiciels/html/exiftool.htm
-
- Posts: 8705
- Joined: Sun Oct 12, 2003 6:47 pm
- Location: Frankfurt, Germany
Re: Folder name search
Your batch script (BAT file) is a good thing, thanks for sharing it, Michel. Just to make sure: My "excellent suggestions" above will help to allow for adding "Folder" as search criteria but even with these changes XnView's search will remain a search for files and not a search for folders. A search for folders is something completely different and would require several changes to the current dialog, I think.
Perhaps, Windows Explorer can also be used for searching folders with specific names:
MS Explorer allows for searching elemtents including folders, filenames. I'm not 100% sure but I think it should be possible to search for folders, only. Following webpage offers lots of infos (which I haven't read, yet): https://www.informit.com/articles/artic ... &seqNum=16
I've tried "abc type:=folder" to find folders, only, but this search finds files with "abc", too. Perhaps someone else can help here.
-
- XnThusiast
- Posts: 1410
- Joined: Tue Sep 27, 2016 8:18 am
- Location: France
Re: Folder name search
I tried a new method :
I added a category ("Folder") on all my folders.
In categories filter, when "Folder" is selected, all folders are shown. With "Quick search", I can instantly find any word I'm looking for in folder names ...
And double click on the result to browse it .
In addition, a "Description" can be added to each folder (Right click, Edit Comment or Ctrl D) , use descript.ion file and not embedded comment.
Trick to be quicker
- Create a description with a single character "x" for all selected folders (in the parent folder)
- Edit the decript.ion hidden file with a notepad, and add some words for each folder, instead of "x"
Then the quick search will instantly find searched folders containing some strings in their name and in their description.
I added a category ("Folder") on all my folders.
In categories filter, when "Folder" is selected, all folders are shown. With "Quick search", I can instantly find any word I'm looking for in folder names ...
And double click on the result to browse it .
In addition, a "Description" can be added to each folder (Right click, Edit Comment or Ctrl D) , use descript.ion file and not embedded comment.
Trick to be quicker
- Create a description with a single character "x" for all selected folders (in the parent folder)
- Edit the decript.ion hidden file with a notepad, and add some words for each folder, instead of "x"
Then the quick search will instantly find searched folders containing some strings in their name and in their description.
Catalogage avec XnviewMP : https://orchisere.fr/logiciels/html/xnviewmpintro.htm
Tutoriel exiftool : https://orchisere.fr/logiciels/html/exiftool.htm
Tutoriel exiftool : https://orchisere.fr/logiciels/html/exiftool.htm
-
- Posts: 270
- Joined: Sun Apr 23, 2023 5:14 am
Re: Folder name search
Hope you can implement this sooner than later, lack of this functionality really holds me back right now.
Unfortunately this method would require to first locate every single folder before assigning it a category which is what i wanted to avoid in first place.michel038 wrote: ↑Tue Sep 27, 2022 1:26 pm I tried a new method :
I added a category ("Folder") on all my folders.
In categories filter, when "Folder" is selected, all folders are shown. With "Quick search", I can instantly find any word I'm looking for in folder names ...
And double click on the result to browse it .
In addition, a "Description" can be added to each folder (Right click, Edit Comment or Ctrl D) , use descript.ion file and not embedded comment.
Trick to be quicker
- Create a description with a single character "x" for all selected folders (in the parent folder)
- Edit the decript.ion hidden file with a notepad, and add some words for each folder, instead of "x"
Then the quick search will instantly find searched folders containing some strings in their name and in their description.
-
- XnThusiast
- Posts: 1410
- Joined: Tue Sep 27, 2016 8:18 am
- Location: France
Re: Folder name search
Search on paths is case sensitive although this option is not enabled (this option only applies to the filenames)
Right, "Search" is intended to find files ...
When a word matches a part of a pathname , all file names that are in that folder will be shown.
But if the folder is empty, it won't be shown
Test in a cmd window :
will show all subfolder names of D:\photos containing Washington
Using a .bat file:
then you can add a new button in the toolbar, linked to this bat file ...
but in this way, we cannot mix searches with other criteria.
Right, "Search" is intended to find files ...
When a word matches a part of a pathname , all file names that are in that folder will be shown.
But if the folder is empty, it won't be shown
Test in a cmd window :
Code: Select all
Dir D:\Photos /s /ad /b | find /i "washington"
Using a .bat file:
Code: Select all
@echo off
:aaa
set /p word="String to search : "
if "z%word%"=="z" goto bbb
Dir D:\Photos /s /ad /b | find /i "%word%"
goto aaa
:bbb
but in this way, we cannot mix searches with other criteria.
Catalogage avec XnviewMP : https://orchisere.fr/logiciels/html/xnviewmpintro.htm
Tutoriel exiftool : https://orchisere.fr/logiciels/html/exiftool.htm
Tutoriel exiftool : https://orchisere.fr/logiciels/html/exiftool.htm
-
- Posts: 270
- Joined: Sun Apr 23, 2023 5:14 am
-
- Posts: 270
- Joined: Sun Apr 23, 2023 5:14 am
-
- XnThusiast
- Posts: 1410
- Joined: Tue Sep 27, 2016 8:18 am
- Location: France
Re: Folder name search
Yes, sorry... If you have got the result in the CMD window, it's the right method.
We can't get a best result with this method.
I thought you were looking for some folders, lost somewhere in the file's tree. (I'm naming my folders with some words that can describe the place, the event or the content. It's helpful to find a photo with incomplete memories)
In cmd environment, you can redirect the result to a text file by adding >file.txt at the end of the command.
Don't know if this can help.
Dir D:\Photos /s /ad /b | find /i "%word%" > C:\doc\result1.txt
I'll be back in about 10 days...
We can't get a best result with this method.
I thought you were looking for some folders, lost somewhere in the file's tree. (I'm naming my folders with some words that can describe the place, the event or the content. It's helpful to find a photo with incomplete memories)
In cmd environment, you can redirect the result to a text file by adding >file.txt at the end of the command.
Don't know if this can help.
Dir D:\Photos /s /ad /b | find /i "%word%" > C:\doc\result1.txt
I'll be back in about 10 days...
Catalogage avec XnviewMP : https://orchisere.fr/logiciels/html/xnviewmpintro.htm
Tutoriel exiftool : https://orchisere.fr/logiciels/html/exiftool.htm
Tutoriel exiftool : https://orchisere.fr/logiciels/html/exiftool.htm
-
- XnThusiast
- Posts: 2009
- Joined: Sat May 09, 2015 9:37 am
Re: Folder name search
there is free, portable app in active development that search instantaneously:
Everything from voidtools.com
you can set it up to filter results by type, eg folder, images.. etc.
Everything from voidtools.com
you can set it up to filter results by type, eg folder, images.. etc.