Page 1 of 1

Keep one of a set of matching files

PostPosted: Thu Mar 21, 2013 12:13 pm
by leefur
I often end up with 3-6 files for the same episode of a TV show, thanks to my automated downloader. They're all neatly renamed, thanks to Hazel, to something like "The.Walking.Dead.s03e14.mkv", "The.Walking.Dead.s03e14.mkv-2", "The.Walking.Dead.s03e14.mkv-3", etc.

Ideally I'd like to keep the file that used to have 1080 in the name over the one that used to have 720 in the name (and then only one of those – the most recent, since sometimes there are reposts – if there are multiple). Barring that, I'd like to keep the largest of the set, as a proxy for quality.

Any ideas? Very much obliged for the help!

Re: Keep one of a set of matching files

PostPosted: Fri Mar 22, 2013 3:32 pm
by Mr_Noodle
A reminder: please keep questions out of the Tips forum. It's for completed tips, so to speak.

If the files for a particular episode are isolated to a folder (and no other files are in there), you might be able to do something set to target "its enclosing folder" with a "any of its sub-files" condition nested underneath it. Otherwise, I think you'll have to use a script.

Re: Keep one of a set of matching files

PostPosted: Fri Mar 22, 2013 3:49 pm
by leefur
Oh, oops, my mistake on the forums. I do like to keep things tidy, so my apologies.

I'll see if I can wrangle Automator on this. Thanks!