How to recover hidden files and folders from memory card.

Technical Level : Intermediate



When you connect your memory card to a PC or connect your phone as a mass storage device to a PC which is infected by a virus, the virus may hide all your files and folders.


The virus also changes their attributes to "hidden" and "read only" and may move all memory card content to another hidden folder, though the size of the disk looks unchanged, files are still invisible.



Steps to recover hidden files and folders:


First, change the settings in "folder options" so that we can see all hidden files and folders,


Open any folder > select organise > folder and search options, select view tab and under hidden files and folders setting, select "show hidden files, folders and drives", and uncheck the option "Hide protected operating system files" and click ok, click yes if a prompt appears for confirmation, now you should be able to see all hidden files and folders.



Second, connect your memory card to PC using a card reader or you can connect your phone as a mass storage device and note down its drive letter. (L) is the drive in my case as shown

1. If you have file, you can manually delete it or use tools like autorun eater(or any other you like).

If all the folders are moved inside a hidden folder, select all the items inside that folder, cut them and paste them to root directory of your memory card.


If you select properties of any folder on your memory card, the hidden attribute might be locked as shown:




To solve these issues, type cmd in the start menu, right click on it and click run as administrator.





2. In the command prompt window, type the following:


L: [Press Enter]


Here, I assume L as your drive letter.





3. Type the following code to reset the attributes of all the files and folders to their default:


Attrib *.* -r -h -s /s /d   [Press Enter]



After few seconds, all the files and folders will be reset to their normal attributes settings.




Hope you enjoyed reading the post and was helpful.

good it worked thanks.........
Can anyone let me know how to retrieve the data from a damaged memory cards? 

Well, you can recover hidden files from the memory card by trying the command prompt option. For this, you need to follow the below steps:

  • First, connect your SD card with PC using the card reader
  • After this, press the Windows + X keys to bring up a dialogue and then click on the Command Prompt (Admin)
  • Now, type the command attrib -h -r -s /s /d G:\*.*(replace G: with the drive letter for your memory card).

After finishing these steps you have to go to your memory card to check if you can view all of the hidden files.

This may help you access the SD card. If your computer still does not detect the SD card, check if you card reader is not faulty. You can also repair your SD card using cmd command. If none of the recovery method works, download and install SD card recovery software on your system. Stellar Photo Recovery guarantees recovery of lost or deleted photos and videos from all types of SD cards (SDXC, SDHC, microSD cards, MacroSD cards, etc.).

Forum Article Info

Last updated September 25, 2020 Views 48,491 Applies to: