How to find Folders with odd conditions

English support forum

Moderators: white, Hacker, petermad, Stefan2

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

How to find Folders with odd conditions

Post by *gtwatson77459 »

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: 3740
Joined: 2007-05-21, 12:17 UTC

Re: How to find Folders with odd conditions

Post by *tuska »

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: 756
Joined: 2014-01-06, 16:26 UTC

Re: How to find Folders with odd conditions

Post by *Ovg »

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 11.01 x64, Windows 7 SP1 x64
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: How to find Folders with odd conditions

Post by *petermad »

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 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
tuska
Power Member
Power Member
Posts: 3740
Joined: 2007-05-21, 12:17 UTC

Re: How to find Folders with odd conditions

Post by *tuska »

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: 756
Joined: 2014-01-06, 16:26 UTC

Re: How to find Folders with odd conditions

Post by *Ovg »

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 11.01 x64, Windows 7 SP1 x64
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: How to find Folders with odd conditions

Post by *petermad »

OP didn't speak about any searching limits
You are right :oops:
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply