How to fix SD card displays 0 Bytes and recovering data?

Occasionally I found my SD card shows 0 bytes, the used and free space are all 0 bytes. But indeed I have stored thousands of documents and pictures on it. What happened on the SD card, and are the data still store on the SD card? How can I fix this 0 bytes errors without losing my data?
This is one of the common data loss situations for all SD card users. Why the SD card shows 0 bytes? The SD card is easily to have this problem after long time usage. And the frequent usage also results in this error. The SD card becomes 0 bytes means that it get blank. The file system has corrupted so it become raw. If you directly format the SD card, you will lost your data forever. Then the problem is how to fix the raw SD card without losing the data?
How to fix 0 Bytes and recover data from SD card?
The first step, run data recovery tool to retrieve data on the raw SD card.
Hdata recovery software supports data recovery from raw SD card and only take 3 steps to restore your data. You can download from its website and follow the steps to easily find back your lost data on the SD card.
The recovery mode for Raw SD card is called Deleted your files from flash disk. You can click this button to scan the raw SD card automatically. It need some times to scan the entire SD card. After scan, you can preview the files recoverable. If you find the files you need, just check them and click Next. At last, you need to choose the recovery path for the files recovered. To avoid possible data loss, you should not select this raw SD card as the recovery path to save the recovered data.
After you have get all your data off the raw SD card, you can start to fix it.
You need to connect your Raw SD card with computer and try the two ways to fix the SD card.
Try command prompt: open the cmd.exe window and type "attrib -h -r -s /s /d g:\*.*" (g is the drive letter of your SD card) and press enter.
Format the SD card: as you have get back all your data, you can directly format the SD card to fix this problem. You can find this SD card in disk management and choose to Format it.
Then the SD card has been fixed, you can restore your data back to the SD card and use it to store new data.