I have a folder with the bulk of files in it of different types, i.e .pdf,.jpg,.png,.tiff etc., but all are named with the extension .JPG. How can I rename all of them with their original extensions? i.e pdf to pdf, tiff to tiff and so on.
I can find the file type by:
file 99.jpg 99.jpg: PDF document, version 1.3
Is there any script or program with which I can do this?