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. I will not blame Everything search until I have exhausted all other possible problems 1st .
Using Everything to produce desired results
-
- Posts: 15
- Joined: Fri Dec 21, 2018 5:00 pm
Re: Using Everything to produce desired results
just going to ramble...
pseudo-code:
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.
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
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.
-
- Posts: 15
- Joined: Fri Dec 21, 2018 5:00 pm
Re: Using Everything to produce desired results
MSDOS Batch For Loop .... OK GREAT
So it seems I depend on EVERYTHING to do "everything" when its NOT a SWISS ARMY KNIFE
But in any case THANKS for the code snippet(s) @therube
So it seems I depend on EVERYTHING to do "everything" when its NOT a SWISS ARMY KNIFE
But in any case THANKS for the code snippet(s) @therube
I do believe you have successfully pointed myself in the right direction.just going to ramble...
-
- Posts: 15
- Joined: Fri Dec 21, 2018 5:00 pm
Re: Using Everything to produce desired results
The code snippit works fine until it hits
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?
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?
Re: Using Everything to produce desired results
- 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
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)
Re: Using Everything to produce desired results
uniq can be gotten from the link I posted before, here viewtopic.php?p=28607#p28607.
(basename will be in the same download.)
(basename will be in the same download.)
Re: Using Everything to produce desired results
@spazumnator:
Don't forget to let us know if the suggestions worked for you.
That will help other people.
Don't forget to let us know if the suggestions worked for you.
That will help other people.