Find duplicates - similarity percent [solved]

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
eil
Posts: 1888
Joined: 13 Jan 2011 19:44

Find duplicates - similarity percent [solved]

Post by eil »

is there a way to specify non-100% match when searching dupes? like i have mp3s in different folders, and i know for sure there are similar files, but they may be of different quality(no Content search possible), and main problem - the may have different start of name( 01.Song & 05.Song doesn't go as Duplicate for pity).
so is there some way to specify "80% match" or to set match by "similar word(s)" in name?
Last edited by eil on 04 Aug 2017 21:36, edited 1 time in total.
Win 7 SP1 x64 100% 1366x768|1900x1080

highend
Posts: 15004
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Find duplicates - similarity percent

Post by highend »

Nope
One of my scripts helped you out? Please donate via Paypal

eil
Posts: 1888
Joined: 13 Jan 2011 19:44

Re: Find duplicates - similarity percent

Post by eil »

hmm.. how about way to make name sorting(custom sorting?) with ignoring smt?(like first 3,4 symbols of item name, or last, or some specific group of symbols)
Win 7 SP1 x64 100% 1366x768|1900x1080

highend
Posts: 15004
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Find duplicates - similarity percent

Post by highend »

That's where custom columns (with a script) come into play...
One of my scripts helped you out? Please donate via Paypal

eil
Posts: 1888
Joined: 13 Jan 2011 19:44

Re: Find duplicates - similarity percent

Post by eil »

can you propose any variant of script for such column that may do sort with such pattern:
[skip this/wildcard]sorting part of name[skip this/wildcard]
Win 7 SP1 x64 100% 1366x768|1900x1080

highend
Posts: 15004
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Find duplicates - similarity percent

Post by highend »

If you provide enough real world examples + what to filter out...
One of my scripts helped you out? Please donate via Paypal

eil
Posts: 1888
Joined: 13 Jan 2011 19:44

Re: Find duplicates - similarity percent

Post by eil »

for pity i can't really provide direct examples as right now i have case with non-english files. still, example is like this =
there are files:
Album #1\01.World.mp3
Album #3\05.World.mp3
Collection\Album Best\12.World.mp3
(i find their presence with Branch View)

i need to have sorting-script, skipping these first X symbols(01. etc) of file name.
X 'cause quite often i need to skip more than 3, so script should be adjustable;
symbols 'cause those at the beginning of file name, may be not numbers(like artist name).
Win 7 SP1 x64 100% 1366x768|1900x1080

highend
Posts: 15004
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Find duplicates - similarity percent

Post by highend »

Works with non english names as well!

Code: Select all

    $numWordsToStrip = 0;

    $item = <cc_item>;
    // Strip numbers, spaces and dots from the beginning of the file name
    $stripped = regexreplace(gpc($item, "base"), "^[0-9. ]+");
    // Strip <x> number of words + a combination of spaces and dashes
    $stripped = regexreplace($stripped, "^(([^ ])+([ -]+)?){$numWordsToStrip}");
    return $stripped;
With $numWordsToStrip = 0;
0.png
With $numWordsToStrip = 1;
1.png
To see the attached files, you need to log into the forum.
One of my scripts helped you out? Please donate via Paypal

eil
Posts: 1888
Joined: 13 Jan 2011 19:44

Re: Find duplicates - similarity percent

Post by eil »

thank you very much! magic works :appl:
Win 7 SP1 x64 100% 1366x768|1900x1080

Post Reply