Match a file name pattern and delete all similar files.

Every PDF file on my hard disk starts with a six digit number, e.g. "025431 Bank statement dated 2019 10 31.pdf.
When Hazel finds a newly scanned PDF file, it gives it a unique name, preceded by the unique number.
The newly named file is then copied into six folders named according to the type of document (bills, bank statememnts, invoices, tax etc.), date, number, and so on, including backups.
Often a rule I have written is not precise enough. The file is wrongly named and filed in the six folders. I then have to improve my rule, and MANUALLY DELETE all six files. Manually updating is very tedious.
Instead, I would like to be able drop any one of the wrongly named files into a folder named "Badly named files", and have Hazel read the six-digit number. (So far no problem). Now I want Hazel to hunt down ALL files which start with the same six-digit number, and to move all those files to trash.
The last bit seems easy at first sight, but I can't seem to do it. I would need to write a rule something like this:
I have looked at loads of possible workarounds, but still can't figure out how to do this. I literally have more than 10'000 wrongly named files, so it is not a manual job, as I would need to delete 60'000 files scattered all across my hard drive in hundreds of folders.
Any ideas?
When Hazel finds a newly scanned PDF file, it gives it a unique name, preceded by the unique number.
The newly named file is then copied into six folders named according to the type of document (bills, bank statememnts, invoices, tax etc.), date, number, and so on, including backups.
Often a rule I have written is not precise enough. The file is wrongly named and filed in the six folders. I then have to improve my rule, and MANUALLY DELETE all six files. Manually updating is very tedious.
Instead, I would like to be able drop any one of the wrongly named files into a folder named "Badly named files", and have Hazel read the six-digit number. (So far no problem). Now I want Hazel to hunt down ALL files which start with the same six-digit number, and to move all those files to trash.
The last bit seems easy at first sight, but I can't seem to do it. I would need to write a rule something like this:
- If folder name "Badly named files" contains a file named {number}{anything}
Do the following
Move all files on the hard disk starting with {number} to trash
I have looked at loads of possible workarounds, but still can't figure out how to do this. I literally have more than 10'000 wrongly named files, so it is not a manual job, as I would need to delete 60'000 files scattered all across my hard drive in hundreds of folders.
Any ideas?