I've managed to create a script that will do this for me:
Code:
#! /bin/bash
path=/data/media/FreeSat
for file in "$path"/*.{ts.ap,ts.cuts,ts.meta,ts.sc,eit} ; do
filename=$(basename -- "$file")
testfile="$path/${filename%%.*}.ts"
if ! [ -e "$testfile" ]
then
echo "$testfile doesn't exit"
echo " deleting $file"
echo
rm -- "$file"
fi
done
I'm going to run this from Cron on my NAS - should do the trick nicely.
Basically, it looks at that folder and finds any files eit, ts.ap, ts.cuts, ts.meta or ts.sc files that don't have an accompanying .ts file and deletes them.
My bash isn't the greatest, so I'm sure it can be improved, but it does the job!
Hope it's useful.