How Can I Remove Virus in My Memory Card and Recover Data

Last updated on March 28, 2024

How to remove memory card virus?

Has your memory card ever infected with virus and all data stored on it becomes corrupted or unreadable?

  • >> SD card attacked by virus
  • >> XD card infected with virus
  • >> Virus-infected CF card

If your memory card has virus infection, remove them with antivirus program at first.

#1 - Remove virus infected memory card with cmd

CMD 1 - Type the following command: attrib -h -r -s /s /d f:\*. * and hit ENTER. You need to replace “F” with your memory card drive letter name. After this, Windows will repair your card and remove virus from your SD card.

recover virus hidden files from usb

Click "Start" Menu > "Run" > type "cmd" > type "attrib -h -r -s /s /d h:\*.* " (h:\ shall be replaced by your own memory card drive letter such as f:\ if it shows f on your computer)

CMD 2 - use the following cmd if d is the drive letter of your memory card. (You need to replace d with your own drive letter.)


#2 - Remove virus from memory card with antivirus software

If there is antivirus protection on your Windows computer, just start virus scanning after inserting the memory card to computer.

No antivirus software? Install some of the following.

Still no effort after scanning memory card with antivirus software?

#3 - Remove virus by formatting memory card

format memory card

Also read: 5 free memory card formatters

Steps to Recover Data from Virus Infected Memory Card SD XD CF


Virus-Infected Memory Card Recovery

Try  iCare Data Recovery Pro to rescue files a memory card which has been attacked by virus before you run anti-virus software to remove the virus.

Step1. You need to connect the memory card to a computer with a card reader. Then, download iCareData Recovery Pro. choose a recovery module.

select recovery mode

Step2. Choose the memory card need to be recovered

wait while scanning

Step3. preview and choose all files you lost due to virus infection and recover them.

preview found photo

Data Recovery from Virus Infected Memory Card

Virus can spread through Internet among different kinds of storage devices. Generally speaking, a memory card might be attacked by virus in following situations:

  • Memory card contracted the virus after connecting it to a virus infected computer
  • Transfer virus infected files to a memory card
  • Visit a website which contains virus while the memory card is inserted in
  • Moe other unknown situations

When a memory stick contracted the virus, files stored on the card might be wiped by the virus. Even worse, virus might corrupt the memory card or data on the card.

Pay attention:
1. If the virus just removed the files stored on the card, data recovery program will be the best way to recover the lost data.
2. If data stored on the memory card is corrupted by virus, you may be unable to open the data even if you can restore it by using data recovery software.

Free downlaod iCare Data Recovery which is helpful with any data recovery from a virus-infected memory card, but you should ensure that the data is not overwritten or the memory card is not physically damaged.

SD Card Is inaccessible/Corrupted because of Virus Infection?

SD Card Is Infected with Virus and Inaccessible

sd card not accessible"I had my SD card infected with virus after connecting it to my brother’s computer. I cannot access the SD card because it always says that SD card is corrupted whenever I try to open it. Run antivirus software to scan the SD card, it scanned virus on the card. I tired to remove the virus, but SD card is still inaccessible. Is there any way to recover data from the virus infected SD card?"

SD card is a type of storage device which is often used in Android phone, digital camera or some other devices. When it is attacked by virus, the SD card might be damaged and cannot be detected by camera, phone or PC.

Then you can format the inaccessible sd card to fix it, first just try the quick format tool or Disk Management. If it is not available, you can try CMD command prompt to repair it.

Video - how to fix sd card inaccessible access denied

Also read: sd card is inaccessible access denied fix

Repair damaged sd card with Windows built-in tool "Error-checking", right click your sd when connected to PC, and find its "Property", open it and navigate to Tools.

Repair sandisk sd with error checkingRepair virus infected sd card with Error-Checking

If the above method does not work, use cmd to repair the damaged memory card with cmd.

Step1: remove the virus on the SD card, insert the SD card into your computer. Run CMD.

Repair inaccessible error SD card with CMDRepair inaccessible error SD card with CMD

Step2: Type“format l: /fs:ntfs”(l is the drive letter of your raw SD card)

Repair inaccessible error SD card with CMDRepair inaccessible error SD card with CMD

Anti-virus Software Removes File Folder on Memory Card

Imagining: Your computer is infected with virus, so you install antivirus software to check and kill all possible viruses. Your memory card is right connected to your computer when you install the antivirus software. In this situation, the antivirus software might consider some files or folders on your memory card as virus and remove it. If antivirus software removes file folders on your memory card, what can you do? Do not panic! You can use iCare Data Recovery software to restore lost photos from SD / microSD, CF, XD, memory stick when data is wrongly deleted by virus if you have not put anything on the memory stick.

How to Repair Corrupted SD Card After virus?

Erase virus and repair damaged sd card

Also read: 7 free memory card repair tool


How to recover files from memory card that shows shortcuts only after virus infection?

You may remove virus at first, and then use command to show files on memory card with attribut, if it does not work, try recovery tool to undelete shortcut files.

Hot Articles

Data Recovery > Card Recovery > Howto > Fix Errors > How Can I Remove Virus in My Memory Card and Recover My Data