Occasional Visitor
Finding file extension

We get a file with different filenames like abc.123.ddmmyy.dat.gz or ddmmyy.hhmiss.dat or something.tar... etc.

I need to copy these file based on their extension. Can you help me get the extension of the filenames? I tried using cut , awk. but they didn't help me much. Please advise.