Applescript to sort similar filenames in a folder - and delete all dupes but the most recent
Trying to sort thru about 1800 files .txt format. About 1/2 of these are dupes. In nearly every case, the filenames are similar between 2-3 files. Looking to build an Applescript that will:
Browse all filenames in a folder and look for similarities between filenames. Typically the first 5-10 characters will be the same.
if at least two files have similar filenames, compare file modification dates
determine which file(s) are older
delete older file(s)
Process all files until done
Ive been reading up on the find command and using its sort attribute, but not getting very far.
Any advice would be great!