Keep only the newest file

Hi there

I have a list of files

filename1.pdf
filename1_.pdf
filename1_test.pdf
filename2,pdf
filename3.pdf

As you can see are there three filename1 files with different endings. What I want to do is to keep the newest of these 3 files and rename this file to filename1.pdf.

Is this possible?

Cheers
Roland