Finding a folder without specific file?
Moderators: Hacker, petermad, Stefan2, white
Very good idea. Please post here if there are any news.Lefteous wrote:2Valery_Kondakoff
Some time ago I added a field named "Content" to my content plug-in "Directory". It's intended to display the files contained in a directory in a tooltip. This field cannot be used in the search in a meaningful way as its length is quite limited. I'm thinking adding another field with support for the search function. Are you interested?
-
- New Member
- Posts: 1
- Joined: 2021-05-26, 15:21 UTC
Re: Finding a folder without specific file?
Hello.
I need to search directory without a specific filetype, display folder, not files.
Example: Search folders in Mp3 folder without jpg files, returning folder names.
Is this improved in Total Commander?
Thanks.
I need to search directory without a specific filetype, display folder, not files.
Example: Search folders in Mp3 folder without jpg files, returning folder names.
Is this improved in Total Commander?
Thanks.
Re: Finding a folder without specific file?
Find dirs without Folder.jpg in it:
1) You will need to install and open TEXTPAD editor.
2) In TC (Total Commander), generate list of ALL directories:
Alt+F7 (Search) *.* [Advanced Tab] [Select Attrib] [Check Directory]; [Start Search]; [Add to list]
3) Copy list of all dirs:
TC: Select, Invert selection; Select, Copy names and paths to Clipboard
Textpad: Paste directory list, press enter to create a NewLine
4) TC, generate list of ALL Folder.jpg:
Alt+F7 (Search) Folder.jpg [Start Search]; [Add to list]
5) Copy list of all Folder.jpg:
TC: Select, Invert selection; Select, Copy names and paths to Clipboard
Textpad: Paste (Folder.jpg) list, press enter to create a NewLine
on TEXTPAD:
6) F9 (sort) From 1, Length 999, case insensitive, OK
7) F8 (replace) [Find what:]
^(.+)\r\1Folder\.jpg\r
[Replace With:] (empty)
[Regular Expression]: CHECK
[Replace All]
That will leave a list of all DIRs without Folder.jpg, it may fail when there are subdirectories, which may be sorted between parent dir and correspondant Folder.jpg.
We must sort to group all directories with it's correspondant Folder.jpg together so Replace will be able to find and eliminate them.
Regular expression detailed explanation:
^ searchs from the begining of line
( ) marks subexpression
.+ the dot finds any char, the plus sign repeats previous one or more times, basically .+ will match everything
\r new line
\1 will match first marked subexpression (so will match the line which contains full path, just marked before) but now we add: Folder\.jpg\r (the dot must be escaped) and another new line. We replace all that with nothing, so remaining lines are the directories which do not have Folder.jpg on it.
1) You will need to install and open TEXTPAD editor.
2) In TC (Total Commander), generate list of ALL directories:
Alt+F7 (Search) *.* [Advanced Tab] [Select Attrib] [Check Directory]; [Start Search]; [Add to list]
3) Copy list of all dirs:
TC: Select, Invert selection; Select, Copy names and paths to Clipboard
Textpad: Paste directory list, press enter to create a NewLine
4) TC, generate list of ALL Folder.jpg:
Alt+F7 (Search) Folder.jpg [Start Search]; [Add to list]
5) Copy list of all Folder.jpg:
TC: Select, Invert selection; Select, Copy names and paths to Clipboard
Textpad: Paste (Folder.jpg) list, press enter to create a NewLine
on TEXTPAD:
6) F9 (sort) From 1, Length 999, case insensitive, OK
7) F8 (replace) [Find what:]
^(.+)\r\1Folder\.jpg\r
[Replace With:] (empty)
[Regular Expression]: CHECK
[Replace All]
That will leave a list of all DIRs without Folder.jpg, it may fail when there are subdirectories, which may be sorted between parent dir and correspondant Folder.jpg.
We must sort to group all directories with it's correspondant Folder.jpg together so Replace will be able to find and eliminate them.
Regular expression detailed explanation:
^ searchs from the begining of line
( ) marks subexpression
.+ the dot finds any char, the plus sign repeats previous one or more times, basically .+ will match everything
\r new line
\1 will match first marked subexpression (so will match the line which contains full path, just marked before) but now we add: Folder\.jpg\r (the dot must be escaped) and another new line. We replace all that with nothing, so remaining lines are the directories which do not have Folder.jpg on it.
Re: Finding a folder without specific file?
Thats a simple job using Everything in TC.
Go to your mp3 base folder and use the following TC search:
ed:folder: !child:*.jpg
Go to your mp3 base folder and use the following TC search:
ed:folder: !child:*.jpg
Windows 11 Home, Version 24H2 (OS Build 26100.4061)
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64