Using Everything to produce desired results

General discussion related to "Everything".
Post Reply
spazumnator
Posts: 15
Joined: Fri Dec 21, 2018 5:00 pm

Using Everything to produce desired results

Post by spazumnator »

Hi,
I have a particular problem, I believe it has to do with my (again) lack of knowledge of searching using logic.

I have two directories with 900+ subdirectorys between them. Most of them (not all yet) I have purposely duplicated their respective name(s) and duplicated file(s) with closely matching-duped names.
In the following example I have listed the (2)two main parent directories that I use. I have shortened their real names for the purpose of this post.
Example:
O:\Sp\Ed_Tr_Co\Sa.com\
O:\Sp\Sa.com\

Stored in these two directories I have child folders with duplicate names as well as dupe files with dupe names.
Example:
O:\Sp\Ed_Tr_Co\Sa.com\Cy_and_Al_In_To\
O:\Sp\Sa.com\Cy_and_Al_In_To\

Some of these directories are NOT duplicated. Especially in the directory "O:\Sp\Sa.com"

What I want too accomplish is:

" I want Everything too NOT display duplicates, just a filtered list of the non-duplicate child folders within the two parent directories.(If any at all)

Now to explain what I am experiencing with these two statements that I have been using.

They are:
!parent: folder: Sa.com\

!parent: folder:"\Sa.com" folder:!"Ed_Tr_Co" !dupe:


Now my issue(s)
1. Statement !parent: folder: Sp.com\ will produce a listing of all the children in both my parent directories ...
note that "Sa.com" is the same name ... different directory. This really is working like I'm needing.

2. Statement !parent: folder:"\Sa.com" folder:!"Ed_Tr_Co" !dupe: is what produces the results that I have issue with.

It created a listing of three child directories:
De_and_An_At_An (This directory is not a dupe) I went back and checked it in Statement #1
Ev_and_Er_Se_Ex (This directory is a dupe) ditto .....
Sa_and_Na_To_To_and_Lu_Up_Or (This is not a dupe directory) same as above .....

I have other directories that #2 Statement ignored altogether, that were ALSO not duplicates, but just plain ignored.

Are there obvious flaws in my statement(s) ? Are I causing any problems, such as my filing system?

I know that your software works flawlessly 99.999% of the time. :D I will not blame Everything search until I have exhausted all other possible problems 1st :oops: .
therube
Posts: 5058
Joined: Thu Sep 03, 2009 6:48 pm

Re: Using Everything to produce desired results

Post by therube »

just going to ramble...

pseudo-code:

Code: Select all

DIR /AD /B DIRTREE1 > TREE1
DIR /AD /B DIRTREE2 > TREE2
FOR i in TREE1
   do basename %i >> TREEb1
   next i
FOR i in TREE2
   do basename %i >> TREEb2
   next i
SORT TREEb1 TREEb2 | uniq -u > UNIQ.TXT
DIR will give you listings of directory names
basename will give you the "bottom-most" part of the directory name,
so Sa.com & Cy_and_Al_In_To, in your example
SORT the two sets of basenames,
UNIQ gives you only those that are not duplicated

pseudo, so the devil is in the details.
See, viewtopic.php?f=5&t=8551.
spazumnator
Posts: 15
Joined: Fri Dec 21, 2018 5:00 pm

Re: Using Everything to produce desired results

Post by spazumnator »

MSDOS Batch For Loop .... OK GREAT

:mrgreen: :mrgreen:

So it seems I depend on EVERYTHING to do "everything" when its NOT a SWISS ARMY KNIFE

:lol: :lol:

But in any case THANKS for the code snippet(s) @therube
just going to ramble...
I do believe you have successfully pointed myself in the right direction.
spazumnator
Posts: 15
Joined: Fri Dec 21, 2018 5:00 pm

Re: Using Everything to produce desired results

Post by spazumnator »

The code snippit works fine until it hits
uniq -u


Because I am running Windows 7 not Windows 10 that line gets ignored.

Is there an equivalent command (OR CODE) in Win 7 I can replace it with?
NotNull
Posts: 5517
Joined: Wed May 24, 2017 9:22 pm

Re: Using Everything to produce desired results

Post by NotNull »

  • In Everything, search for:

    Code: Select all

     folder:   parent:"O:\Sp\Ed_Tr_Co\Sa.com\" | parent:"O:\Sp\Sa.com\"
  • Export the results as an EFU Everything File List (*.efu) (Menu:File > Export)
  • Press CTRL+HOME to clear the current search
  • Open the EFU file (MEnu:File > Open File List
  • Search for

    Code: Select all

    !dupe
When done, you can close the File List using Menu:File > Close File List.

therube wrote: Thu Oct 31, 2019 11:27 pm pseudo, so the devil is in the details.
Some details:

Code: Select all

dir /ad /b "O:\Sp\Ed_Tr_Co\Sa.com\" > "%temp%\folder1.txt"
dir /ad /b "O:\Sp\Sa.com\"                > "%temp%\folder2.txt"

echo.------------------------------------------
echo.            Only in "O:\Sp\Ed_Tr_Co\Sa.com\"
echo.------------------------------------------
for /f "usebackq delims=" %%x in "%temp%\folder1.txt" DO ( findstr /b /e /c:"%%~x" "%temp%\folder2.txt" >nul || echo %%x)

echo.------------------------------------------
echo.            Only in "O:\Sp\Sa.com\"
echo.------------------------------------------
for /f "usebackq delims=" %%x in "%temp%\folder2.txt" DO ( findstr /b /e /c:"%%~x" "%temp%\folder1.txt" >nul || echo %%x)

Note: Both solutions are untested.
therube
Posts: 5058
Joined: Thu Sep 03, 2009 6:48 pm

Re: Using Everything to produce desired results

Post by therube »

uniq can be gotten from the link I posted before, here viewtopic.php?p=28607#p28607.
(basename will be in the same download.)
NotNull
Posts: 5517
Joined: Wed May 24, 2017 9:22 pm

Re: Using Everything to produce desired results

Post by NotNull »

@spazumnator:

Don't forget to let us know if the suggestions worked for you.
That will help other people.
Post Reply