Hi,
I had the same need, and I think you can addapt my script.
After playing the script, look at the log file and just keep what you need in the log file to make a batch command lines. And play that batch file.
For information, this script compare analysis properties of files, and if equals, it logs the needed command line to delete one of them and make a hard link to the second one.
Enjoy.
/*
Author: Cedric
Description: Mark all files that have same analysis
*/
// unmark all files
results.audio.unmark();
var dups = results.audio.dups;
for (var idx = 0; idx < dups.length; ++idx) {
// skip counter-pair (1-2 and 2-1), process pair only once
if (dups[idx].item1.path > dups[idx].item2.path) continue;
try {
if (dups[idx].item1.analysis.duration == dups[idx].item2.analysis.duration && dups[idx].item1.analysis.samplerate== dups[idx].item2.analysis.samplerate && dups[idx].item1.analysis.datatype == dups[idx].item2.analysis.datatype && dups[idx].item1.analysis.channels == dups[idx].item2.analysis.channels && dups[idx].item1.analysis.format == dups[idx].item2.analysis.format && dups[idx].item1.analysis.clips == dups[idx].item2.analysis.clips && dups[idx].item1.analysis.silence == dups[idx].item2.analysis.silence && dups[idx].item1.analysis.absMean == dups[idx].item2.analysis.absMean && dups[idx].item1.analysis.minStep == dups[idx].item2.analysis.minStep && dups[idx].item1.analysis.absMax == dups[idx].item2.analysis.absMax && dups[idx].item1.analysis.maxFreq == dups[idx].item2.analysis.maxFreq && dups[idx].item1.analysis.clicks == dups[idx].item2.analysis.clicks && dups[idx].item1.analysis.rating == dups[idx].item2.analysis.rating) log('delete "'+ dups[idx].item2 + '" mklink /h "' + dups[idx].item2 + '" "' + dups[idx].item1+ '"' );
}
catch (e) {
log('Exception ' + e);
}
}