I have been digging around the net and ubuntu forums to find solution to this.
foremost, testdisk, photorec, scalpel..all tried. I got my photos back, with other problems I narrate below.
the problem was: the photos folder on my external drive was gone, somehow deleted. 2500+ photos.
then I used testdisk and photorec (by the way, simultaneously, dont know if this had any effect on the result..) to recover them.
testdisk did not return this folder, nor the photos. instead it did show another folder that I deleted yesterday, and successfully restored it ( I did this just to see whether it worked.)
photorec restored "all" photos in "re-cup" titled folders. I was informed later that this was typical of photorec, disregarding original names and folders.
but this alone were ok.
the problem I refer is that many of the recovered photos, which originally had jpeg formats, are now in png format, and more, are replaced by mere 2-3 images from a video I'd saved. so bizarre, these 2-3 still images from the video are what is to be seen in all these 100s of photos (the video might not even have been in the same folder, but in another "video" folder!).
in addition, many of the photos in jpeg format were reduced down to thumbnail size. curiously, others weren't.
so this was the result with photorec.
when I tried scalpel after that, I received a folder full of octet-stream files named as jpg(-number) and gif(-number) (folder was created and auto-named as scalpel-output, as I gave the target folder name as "scalpel", as advised on the help website.) Can I do proceed anywhere further with these files?
and, when scalpel completed the scan, though at the end there was the message that the target "scalpel" was not found. then I tried to create a folder with this name, this time it said the folder was not empty and that this was forensically not sound, and hence aborted.
foremost didnt work at all. when I used the commands as advised on the helping websites, the lines on terminal were filled with non-alphanumeric, crazy error symbols.
I tried to do above scans directly with the SD card of the camera, instead of the external drive, where the photos were saved. but testdisk strangely gave error like bad partition or sector..
I thought maybe I could recover all photos as original if I used one of the above methods other than photorec, but none hence seemed to work. I may possibly have done sth incomplete, too, as I use all these software for the first time.
nor I could find any information on how to revert from png back to jpeg in cases like this. it's as if there are not many examples of such data corruption.
as one more way to go, it comes to mind to scan the internal hard drive the same way.
I have no idea how this loss might have happened, and how I can avoid it.
would you have any suggestions what to do to recover the files?
Thank you very much for your time!