Extract first file from archive

Can anyone help me with a command or script that will extract the first file of the selected archive(s), and rename it to match the name of the archive?

How do you define "first file"?

The one at the top when sorted by file name...