Page 1 of 1
Trying to find duplicate files with DIFFERENT extensions...
Posted: 28 Jul 2023 16:15
by Boznian2
I have created duplicates of my ALAC (m4a extension) audio files as FLAC (flac extension). There are thousands of them, and each duplicate file is in the same directory. For example, each artist is its own directory, and has one or more albums as subdirectories, under which there might be 1 or 20 pairs of songs with the exact same name, but the different extensions as above. I need some way to find and delete all the ALAC duplicates.
The duplicate files are NOT the same size; not all the files are duplicated; not all the .m4a's are duplicated. (So I can't just search for *.m4a, or this would be easy).
I have Doppleganger, FolderClone, FolderMatch apps and none of them can do it. Any ideas other than going through them all manually??
Re: Trying to find duplicate files with DIFFERENT extensions...
Posted: 28 Jul 2023 16:44
by highend
Open the search panel, click on the dupes tab, check [x] Name and in the dropdown, "Ignore Extensions"?
Re: Trying to find duplicate files with DIFFERENT extensions...
Posted: 28 Jul 2023 19:14
by Boznian2
I have done that before and the search results in 8,392 items. Scrolling through, most seem to be exactly what I am looking for, a list of [song1.flac] followed by [song1.m4a], etc. HOWEVER, there are many instances where there is just one lone .m4a, (or 2 or 3 in a row). It appears as if it is treating folder names as duplicates also- "Baby Come Back.m4a" is listed as a 'lone' dupe, but "Baby Come Back" is also the folder in which it resides. So obviously, I can't just go through and delete all the *.m4a's in this situation. Is there a way to eliminate folders OR specify files only to be considered dupes? I do have the search criteria set to "Audio files" already.
Re: Trying to find duplicate files with DIFFERENT extensions...
Posted: 28 Jul 2023 20:31
by highend
Can't replicate that (a file is treated as a "lone" duplicate when a folder with the same name (but ofc without an extension) exists or if such a file is in such a folder)...
But a script can easily do that...
Run it when inside the root folder for all the subfolders (with artist names)...
It will find all .m4a files that have the same name counterpart (as .flac) in the same folder and offers you to delete those .m4a's afterwards...
Code: Select all
$folders = quicksearch("/d");
end (!$folders), "No subfolder(s) present, aborted!";
$delete = "";
foreach($folder, $folders, <crlf>, "e") {
$m4as = quicksearch("*.m4a /n", $folder);
if (!$m4as) { continue; } // No original file(s) present
$flacs = quicksearch("*.flac /n", $folder);
if (!$flacs) { continue; } // No possible dupe file(s) present
foreach($m4a, $m4as, <crlf>, "e") {
$base = gpc($m4a, "base");
$dupe = $folder . "\" . $base . ".flac";
if (strpos($flacs, $dupe) != -1) {
$delete .= $m4a . <crlf>;
}
}
wait 1;
}
if ($delete) {
$sel = inputselect("File(s) which have a dupe...", $delete, <crlf>, 1+2+4096+16384+32768, , 800, 800);
if ($sel) {
delete 1, 1, $sel;
}
}
Re: Trying to find duplicate files with DIFFERENT extensions...
Posted: 29 Jul 2023 14:52
by Boznian2
Thanks a bunch, you saved me a bunch of time and heartache. Donation made!
Re: Trying to find duplicate files with DIFFERENT extensions...
Posted: 29 Jul 2023 14:54
by highend
No problem and

for the donation
