How to find Folders with odd conditions

English support forum

Moderators: Stefan2, white, sheep, Hacker

Post Reply
gtwatson77459
Junior Member
Junior Member
Posts: 22
Joined: 2008-02-15, 13:59 UTC
Location: Houston, Tx

How to find Folders with odd conditions

Post by *gtwatson77459 » 2019-05-03, 18:15 UTC

I know TC can do almost everything but here is what I want to do:

I have several folders with many files. I want to find folders that have files with .BAK extension where there are no other files with .XYZ as an extension in the same folder.

I can search for *.BAK and come up with 857 files but I want to find the folders that contain BAK but do not have any .XYZ extensions within the folder.

Is there a way?

User avatar
tuska
Power Member
Power Member
Posts: 1463
Joined: 2007-05-21, 12:17 UTC

Re: How to find Folders with odd conditions

Post by *tuska » 2019-05-04, 16:21 UTC

Without a script (I am not a programmer) this could probably be solved as follows.

Directly in Everything input line, then Export... (Example drive D:)
(1) D:\ child:*.bak        File - Export...: bak.efu            Searching - child:
(2) D:\ child:*.xyz        File - Export...: xyz.efu

In Total Commander:
(3) Compare files by content: cm_CompareFilesByContent (button with command...)
                                bak.efu <=> xyz.efu --> remove identical folders (from xyz.efu) in bak.efu, save bak.efu.

(4) Open the file bak.efu by double clicking on the file in Total Commander --> in Everything.


Windows 10 Pro (x64) Version 1809 (Build 17763.475) | TC 9.22a x64/x86
☑ 'Everything'  | Everything - Version 1.4.1.941 (x64) | How to use TC <=> Everything

User avatar
Ovg
Power Member
Power Member
Posts: 587
Joined: 2014-01-06, 16:26 UTC
Location: MOW

Re: How to find Folders with odd conditions

Post by *Ovg » 2019-05-04, 17:48 UTC

No script needed :D
Everything search in TC:

Code: Select all

ev:!child:*.xyz child:*.bak
https://yadi.sk/i/5C37PCb1l-UqQA
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 9.21a x64, Windows 7 SP1 x64

User avatar
petermad
Power Member
Power Member
Posts: 8341
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: How to find Folders with odd conditions

Post by *petermad » 2019-05-04, 18:54 UTC

Ovg wrote:
2019-05-04, 17:48 UTC
Everything search in TC:

Code: Select all

ev:!child:*.xyz child:*.bak
That will search in all the drives and directories that is indexed by 'Everything' - better use ed: to only search from current directory:

Code: Select all

ed:!child:*.xyz child:*.bak
And this will only show the directories that matches the conditions, not the .bak files themselves in the search result
Last edited by petermad on 2019-05-05, 08:15 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 9.22a 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 64bit, 'Everything' 1.4.1.935 (x64) and TC 3.0b3 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

User avatar
tuska
Power Member
Power Member
Posts: 1463
Joined: 2007-05-21, 12:17 UTC

Re: How to find Folders with odd conditions

Post by *tuska » 2019-05-04, 21:15 UTC

2Ovg
Thank you for pointing this out!
I was thinking too complicated.

Btw, if you use the parameter ev: in TC (your picture), the field "Search in" in TC will be ignored.
--------------
The search can also be narrowed down with the parameter ev:, e.g. as follows (for drive D:   OR   D:,I:,J:):

Code: Select all

ev:D: !child:*.xyz child:*.bak
ev:<D:|I:|J:> !child:*.xyz child:*.bak
Regards
Karl

User avatar
Ovg
Power Member
Power Member
Posts: 587
Joined: 2014-01-06, 16:26 UTC
Location: MOW

Re: How to find Folders with odd conditions

Post by *Ovg » 2019-05-05, 14:28 UTC

2petermad
2tuska
gtwatson77459 wrote:
2019-05-03, 18:15 UTC
... I have several folders with many files. I want to find folders that have files with .BAK extension where there are no other files with .XYZ as an extension in the same folder. ...
OP didn't speak about any searching limits ..... :mrgreen: :D
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 9.21a x64, Windows 7 SP1 x64

User avatar
petermad
Power Member
Power Member
Posts: 8341
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: How to find Folders with odd conditions

Post by *petermad » 2019-05-06, 01:40 UTC

OP didn't speak about any searching limits
You are right :oops:
License #524 (1994)
Danish Total Commander Translator
TC 9.22a 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 64bit, 'Everything' 1.4.1.935 (x64) and TC 3.0b3 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

Post Reply