Duplicate <preceding path>\filename

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
hlz
Posts: 2
Joined: Wed Aug 15, 2018 12:43 am

Duplicate <preceding path>\filename

Post by hlz »

Hello,

chkdsk screwed up a lot of my files and I'm dealing with reorganizing a mess of folders and recovered files in two distinct drives and different folder structures.

I would like to have a way to find duplicate <preceding path>\filename.
So, as an example, the following files would be displayed:

c:\foo\bar\blabla\file.txt (size: 0 kb, thanks to chkdsk)
d:\bizarre\path\structure\blabla\file.txt (size: 5 MB)

So, what I need is to list duplicate strings composed of the immediately preceding folder name and of the filename.
I would like to find two levels of folder structure too. For example:

c:\foo\bar\blabla\file.txt (size: 0 kb, thanks to chkdsk)
d:\bizarre\path\structure\bar\blabla\file.txt (size: 5 MB)

Any clue to a regex to do this in Everything?

Thank you all in advance for any help
therube
Posts: 4604
Joined: Thu Sep 03, 2009 6:48 pm

Re: Duplicate <preceding path>\filename

Post by therube »

Offhand, the only thing I'm thinking is if /blabla/ is unique enough then:

> dupe: /blabla/


If you know the /blabla/ trees, then maybe a duplicate file finder or directory compare program can help.

Code: Select all

alldup.exe   c:\foo\bar\blabla\   d:\bizarre\path\structure\blabla\
With http://www.alldup.info/ set to search for duplicates by name.
You could run from command line, like above, paste paths in (from Everything, of course), or drag paths into the GUI (from Everything, of course) or ...
hlz
Posts: 2
Joined: Wed Aug 15, 2018 12:43 am

Re: Duplicate <preceding path>\filename

Post by hlz »

Hi,

blabla is variable (not unique) and unknown.

I would like to find all duplicate combinations of strings composed by imediatelly preceding path name and file name.

Anyway, thank you very much for your tips and sugestions.

Have a nice day
void
Developer
Posts: 15251
Joined: Fri Oct 16, 2009 11:31 pm

Re: Duplicate <preceding path>\filename

Post by void »

It is currently not possible to search for <preceding path>\filename duplicates in Everything.

Please try the following:
  • Select all the files of interest.
  • From the Edit menu, under the Advanced submenu, click Advanced Move to Folder....
  • Check Regex
  • Change Old format to:
    ^(.*)\\(.*?)\\(.*?)$
    Change New format to:
    \1\\\2/\3
  • Select all the text in New full paths and filenames and copy it to the clipboard.
  • Click Cancel.
  • Open Notepad (Start run -> notepad)
  • Make sure the first line reads:
    Filename
  • On the second line, paste the contents of the clipboard.
  • From the File menu, click Save.
  • Change Save as type: to All Files (*.*).
  • Change Encoding: to UTF-8.
  • Choose a filename with an .efu extension and click Save, for example precedingpath/filename.efu
  • Open this file list in Everything from File -> Open File Lists....
  • Search for:
    dupe:
  • Find the duplicated files of interest
  • Replace / with \ where needed in Windows Explorer.
  • or, to copy multiple filenames with all / replaced with \, From the Edit menu, under the Advanced submenu, click Advanced Move to Folder....
  • Check Regex
  • Change Old format to:
    ^(.*)/(.*?)$
    Change New format to:
    \1\\\2
  • Copy the text in New full paths and filenames.
  • Click Cancel.
Post Reply