Este script Python fez o trabalho:
import os.path as osp
import os
import re
for directory in os.listdir('images'):
files = [f for f in os.listdir('images/'+directory+'/') if not re.match(r'([a-za-z]|[0-9])+.*\.jpeg', f)]
for f in files:
complete_file_path = 'comments/'+ directory+'/'+f[:-4]+'.txt'
if osp.exists(complete_file_path):
os.remove(complete_file_path)