Hi there. I am sorry to hear the you have lost your files. What I have done before is using a software that is capable of recovering files form formatted hard drives or a memory card such as this one wondershare.
Do you format the card after you put the sd card into laptop? I am formatting the card every time I take sd card out and putting in laptop. But i am afraid this might not be good to do this so often
I do not format the card right after I transfer the files to the computer. However I delete the content from the card right after. But every time I have to use the card I do format it with the exact device I will be using the card on. So make sure you do that also.