How to search dupes in the first X characters of the name?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
[ITA]
Posts: 2
Joined: Tue Mar 21, 2017 5:46 pm

How to search dupes in the first X characters of the name?

Post by [ITA] »

Greetings to everyone!
I'm not an expert at all and I don't know if the following is possible...
I've created a folder with tons of subfolders with various homebrew software in it. They are sorted with an alphanumeric system, like this: AIXXXXXX (Where X = A number). The initial "AI" is in every folder.
Folders Examples: "AI885699 v2.8 Feed", "AI119739 v1.1 Prog".

Now, the problem is that sometimes I forget to check if a folder for that software already exist and I stupidly create a dupe.
An Example of dupes: "AI885699 v2.8 Feed", "AI885699 v2.5 Feed", "AI885699 v1.2 Feed".

Is there a way to search dupes only between the first 8 characters of the folders names knowing only the first 2 characters?

Thanks for the attention and sorry if it wasn't clear, I'm trying my best, but English is not my first language.
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: How to search dupes in the first X characters of the name?

Post by therube »

A seg$() function (in addition to being able to filter out "noise characters", & an "ignore list") would be nice, IMO, but doesn't exist.

Maybe something like:

dupe: folder: AI

would help, or a least lessen what is displayed.


(Note that it is actually folder including path that is displayed, in this case.)
[ITA]
Posts: 2
Joined: Tue Mar 21, 2017 5:46 pm

Re: How to search dupes in the first X characters of the name?

Post by [ITA] »

therube wrote: dupe: folder: AI

would help, or a least lessen what is displayed.


(Note that it is actually folder including path that is displayed, in this case.)
Thanks! It looks like it did the trick, I've detected and deleted many dupes. You just saved me a lot of space and work. Thank you very much!
void
Developer
Posts: 16751
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to search dupes in the first X characters of the name?

Post by void »

I did have a look at implementing single line and multi-line regex support, but it was way too slow...

Here's what I did to find duplicated results with the first 8 characters:
  • Note: you will need Excel 2007 or later (I tested with Office 2016).
  • In Everything, search for folders only, limit the search to the folder containing all your AI folders and limit the search to filenames starting with AI:
    folder: "D:\rootfolder\subfolder\" AI*
  • Export the results to an EFU file:
    • From the File menu, click Export
    • Change save as type to EFU Everything File List.
    • Choose a filename and click OK.
  • In Excel, start a blank workbook.
  • From the data menu, click From Text.
  • Select the exported EFU file from above and click OK.
  • Change File Origin to 65001 : Unicode (UTF-8)
  • Click Next.
  • Uncheck Tab.
  • Check Comma.
  • Click Next.
  • Select the first column and click Text.
  • Click Finish.
  • Click OK.
  • Change the first cell (A1) from Filename to: Full Filename
  • Right click the A column header and click Insert to create a new column before column A.
  • Set the first cell (A1) to Filename
  • Set the second cell (A2) to:
    =LEFT(TRIM(RIGHT(SUBSTITUTE(B2,"\",REPT(" ",LEN(B2))),LEN(B2))),8)
  • Select the A2 cell and copy it to the clipboard.
  • Select from A3 all the way to the bottom of the spread sheet. (Column A only) and paste the contents of the clipboard.
  • From the File menu, click Save.
  • Change Save as type to CSV (Comma delimited)
  • Choose a new filename and click Save.
  • Exit Excel.
  • Rename this newly exported file so it has a .efu extension.
  • Open the efu file in Everything and search for: dupe:
Post Reply