Find duplicates of files in 1 folder anywhere else on the PC

Discussion related to "Everything" 1.5 Alpha.
Post Reply
eswul62
Posts: 128
Joined: Wed Jul 31, 2013 6:07 am

Find duplicates of files in 1 folder anywhere else on the PC

Post by eswul62 »

I wish Everything could fine duplicate files (size-modified date) of all files in 1 folder and find duplicates elsewhere.

Example:
X:\Download\Folder
files1.txt
files2.txt
files3.txt
files4.txt
etc.

Rightclick 'Folder' search for duplicates of the files (files1.txt, files2.txt, etc)
anywhere else.

Right now I have to do this one-by-one.

Example:

=
SnagIt-19052024 134147.png
SnagIt-19052024 134147.png (105.67 KiB) Viewed 2487 times
=

Right click a file > select the folder (camera in this example) , search with Everything
How to find dups of the listed file 'elsewhere' on the PC

Thanks.
therube
Posts: 4972
Joined: Thu Sep 03, 2009 6:48 pm

Re: Find duplicates of files in 1 folder anywhere else on the PC

Post by therube »

See if you can work something up based upon, Compare the content of one folder with an entire drive?.


This might be the Search:
file: <[element:$param:,;,1] A:=Source > | < ![element:$param:,;,1] [element:$param:,;,2] A:=Target> dupe:size;dm,!column-A


And if your macro was: anywhere2
then a search something like
anywhere2:"d:\downloads\samsung downloads\camera";c:\


Though there is issues with that.
Not sure how to tell it to search everywhere, rather then only an other directory/volume?
And it does not look to find dupes that are on another volume?

In my test, c:/out/;c:/ was OK, but c:/out/;e:/ was not?
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Find duplicates of files in 1 folder anywhere else on the PC

Post by NotNull »

Anotrher approach:
  • Search for:

    Code: Select all

    file:  "X:\Download\Folder\"
  • Select all results ( CTRL + A)
  • Right-click in the Name column
  • Select Copy Name from the context menu to copy them to the clipboard
  • Change the search to (or use a new tab):

    Code: Select all

    filelist1:   dupe:name,size,dm 
  • Right-click filelist1:
  • Select Edit File List Slot
  • Paste the filenames from the clipboard
  • Click OK
  • Done (?)
eswul62
Posts: 128
Joined: Wed Jul 31, 2013 6:07 am

Re: Find duplicates of files in 1 folder anywhere else on the PC

Post by eswul62 »

Took your last reply.

Wow!! Magnificant!

That is really, really great.

Thank you so much. The solution is not easy to find, that's for sure, but it is super.

Maybe one day, Everything will have a feature that will make this all a bit easier.
Like: dupe:size,dm from clipboard, or whateaver.

Again - thanks!
NottMee
Posts: 19
Joined: Tue Jun 27, 2023 6:43 pm

Re: Find duplicates of files in 1 folder anywhere else on the PC

Post by NottMee »

My current solution is using an AutoHotkey script and set a hotkey to do these things in sequence (after selecting the files, of which I want to find duplicates)
1. right click, copy all sizes (or filenames or dm etc.)
2. automatically convert the infos to someting like "size:137984837|size:148577632|size:1406454143"
3. paste in the search bar and press the hotkey set in Everything to find size duplicates.

Hope this will give you some ideas.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Find duplicates of files in 1 folder anywhere else on the PC

Post by NotNull »

NottMee wrote: Wed May 22, 2024 12:55 pm My current solution is using an AutoHotkey script and set a hotkey to do these things in sequence
Please post your code. It might help other people too.
NottMee
Posts: 19
Joined: Tue Jun 27, 2023 6:43 pm

Re: Find duplicates of files in 1 folder anywhere else on the PC

Post by NottMee »

NotNull wrote: Wed May 22, 2024 4:43 pm
NottMee wrote: Wed May 22, 2024 12:55 pm My current solution is using an AutoHotkey script and set a hotkey to do these things in sequence
Please post your code. It might help other people too.
Glad to, if this helps.
The original script may only work on my computer, please modify according to your Everything settings.
Downloads and help docs: https://www.autohotkey.com/

Before clicking the hotkey, select the target files and then move the mouse to size column

Code: Select all

F4:: ;the hotkey you want
ClipSaved := ClipboardAll ;save current clipboard for later restore
Send {Shift Down} ;"copy size" only shows when you press the shift key
Click R ;right click
WinWait ahk_class #32768 ahk_exe Everything64.exe, , 10 ;wait (max 10sec) until the right menu pops out, if many files are selected, it will be quite a long time.
Sleep 75
Send {Down 2}{Enter} ;select "copy size"
Sleep 75
Send {Shift Up}
Sleep 500
Clipboard := StrReplace(Clipboard, "`r`n", "|size:") ;format the copied size infos for later paste
Sleep 75
Clipboard := "size:"Clipboard
Sleep 75
Send {F3}^v{Tab}^s ;set a hotkey to focus to searchbar (eg. F3) and a hotkey to find size duplicates (eg. Ctrl+S). As an option, you can also add a key to view thumbnails or bigger icon previews
Sleep 75
Clipboard := ClipSaved ;restore the Clipboard
Return
eswul62
Posts: 128
Joined: Wed Jul 31, 2013 6:07 am

Re: Find duplicates of files in 1 folder anywhere else on the PC

Post by eswul62 »

NotNull wrote: Tue May 21, 2024 5:46 pm Anotrher approach:
  • Search for:

    Code: Select all

    file:  "X:\Download\Folder\"
  • Select all results ( CTRL + A)
  • Right-click in the Name column
  • Select Copy Name from the context menu to copy them to the clipboard
  • Change the search to (or use a new tab):

    Code: Select all

    filelist1:   dupe:name,size,dm 
  • Right-click filelist1:
  • Select Edit File List Slot
  • Paste the filenames from the clipboard
  • Click OK
  • Done (?)
I am using Directory Opus as the Explorer replacement.
Within Opus, I may open the folder, then select all the files in that folder.
Then run context menu: Find duplcates.
Which will run a command the command line:

"X:\Everything\Everything64.exe" -s* size:[getsize:"%1"] dm:[formatfiletime:[get-date-modified:"%1"],yyyyMMdd\THHmmss.SSSSSSS]

However, this will, of course, run Everything for each single file, i.e. there maybe, for instance, 12x Everything runs in the taskbar.
Sadly, parameter -nonewwindow does not help in this case.

Else it would have been a nice solution.
eswul62
Posts: 128
Joined: Wed Jul 31, 2013 6:07 am

Re: Find duplicates of files in 1 folder anywhere else on the PC

Post by eswul62 »

NotNull wrote: Tue May 21, 2024 5:46 pm Anotrher approach:
  • Search for:

    Code: Select all

    file:  "X:\Download\Folder\"
  • Select all results ( CTRL + A)
  • Right-click in the Name column
  • Select Copy Name from the context menu to copy them to the clipboard
  • Change the search to (or use a new tab):

    Code: Select all

    filelist1:   dupe:name,size,dm 
  • Right-click filelist1:
  • Select Edit File List Slot
  • Paste the filenames from the clipboard
  • Click OK
  • Done (?)
Please let me add the following 'alternative' as a 2nd option.

Up front: it requires a Windows Explorer replacement tool, such as Directory Opus, Total Commander, etc.
(AFAIK this method is not directly possible in Windows Explorer, one has to use a command line instruction)

In Opus:
1. ctrl-a to select all files in a folder
2. Edit > Copy File Names
(Total Commander, I think, maybe something like: Menu -> Mark -> "Copy Selected Names To Clipboard")
3. Everything > Search > Advanced Search at the bottom > Search for a list of file names: click on the [...]
4. Paste
5. OK (2x)
Everything-Find duplicate files elsewhere using Directory Opus--09082024 052425.jpg
Everything-Find duplicate files elsewhere using Directory Opus--09082024 052425.jpg (531.04 KiB) Viewed 1382 times
eswul62
Posts: 128
Joined: Wed Jul 31, 2013 6:07 am

Re: Find duplicates of files in 1 folder anywhere else on the PC

Post by eswul62 »

Update, really a very nice solution. Applicable when using Directory Opus - see note.

Everything > Options > Advanced: go to 'paste_new_line_op' : change AND into OR [Apply]

then in Everything go to Bookmarks > Add bookmark, Name: Filelist (or whatever) in Search-box: Filelist: [OK]

In Opus: select some files, Edit, copy file names

Everything, select bookmark 'Filelist' - paste file names

Note: AFAIK within Windows Explorer there is no option to just simply copy file names only, like in Opus)
(CTRL-A, CTRL-C copies the entire path. It requires workarounds or tools like "CopyFilenames" to solve this problem)
Post Reply