Perhaps you could explain exactly what you are trying to do. Exec files sound like program files, whilst jpg is an image format. You can't meaningfully convert one to another. It's a bit like asking how to change a picture of your pet into an audio file that you can listen to on your audio player.
My external hard damaged 2 months ago.and I had to recovery all my data.The file was jpg originally but it has converted to exec file now.maybe it has damaged.I don't know exactly.And I need this image file now.Even I tried to open the exec file in adobe aftereffect( the program that is recommended on mac by default), maybe I can do sth with it there,but it hasn't open there too.
Changing the name would have no effect on the contents of the file. If it doesn't open now as a jpeg then it's damaged.