> How to > File Recovery > Recover Files from a Virus Infected Hard Drive, Memory Card and USB Drive

Recover Files from a Virus Infected Hard Drive, Memory Card and USB Drive

Updated on Nov 29, 2018 by Abby Haines to File Recovery


When you lose files after a virus attack, you can try two possible virus file recovery solution here for help: clean your drive then recover virus infected data using cmd or recover with a professional data recovery software.

Have you ever been attacked by one or more unknown viruses? If you have such an experience, you will know that a virus attack can result in unexpected data loss on a hard drive, a memory card or a USB drive.

For users who have no idea how to recover virus-infected files, it can be a real disaster! But no longer! On this page, we will introduce to you two possible solutions for virus infected file recovery: repair and recover virus infected files using CMD and recover virus infected files with a professional  data recovery software. These solutions should be executed in succession. If the first one doesn’t work out, then continue to the second. 

Solution 1. Use CMD to recover files from virus infected storage media 

When your data is lost or inaccessible due to a virus attack, your best bet is to first try to use the Command Prompt (cmd) to recover virus infected files. Since it is free and well-understood, cmd is an excellent choice. Now let's see how this works. (I will be using Windows 7 for this demonstration, but the process is largely the same for other OS versions)

1. Plug your hard drive, memory card, or USB drive into your computer

2. Go to the start menu, type in "cmd" in the search bar, hit enter. You'll then see something named "cmd.exe" under a list of programs.

Use CMD to recover files from virus infected storage media step 1

3. Click "cmd. exe" and then you will be directed to the Windows command line that allows you to recover virus-infected files.

  • Type: chkdsk E: /f and hit Enter. (Replace E: with the drive letter of the device or location where you have virus-infected files.)
  • Type: Y and hit Enter.
  • Type E: and hit Enter. (Replace E: with the appropriate drive letter.)
  • Type: attrib -h -r -s /s /d *.* and hit Enter.  

Windows will then start to repair the virus-infected hard drive, memory card, or USB drive. The repair usually takes one or two minutes. Please wait patiently. After the repair process, navigate to your disk or card and check if you can see all of the previously virus-infected files.  

If you can see everything now on your USB, memory card, or hard drive which was infected with the virus, congratulations! But if not, don't despair. You have another option. Just try a third-party data recovery software in Solution 2!

Solution 2. Use EaseUS data recovery software after virus file cleanup

When you fail to manage virus file recovery using only cmd, EaseUS hard drive data recovery software becomes a good choice. This program is a professional recovery software for all storage devices. With its powerful file recovery capacity, it can effectively recover deleted, corrupted, or hidden files from virus-infected hard drives, memory cards, and USB drives.

This virus file recovery process is straightforward! For a step-by-step tutorial, please refer to the steps below as a guide.

Please Note:

1. EaseUS data recovery software - Data Recovery Wizard only supports to recover deleted or removed files by the virus.

2. And you should also refer to virus removing tool to clean the infection from your hard drive or USB/SD card before starting to restore data.

3. If your hard drive is infected by a complex virus and lost data, try this software to find your lost data from the virus infected drive now.

Run data recovery software on PC.

If your USB or SD card is infected by a virus, connect it to your PC before running EaseUS Data Recovery Wizard.

Open EaseUS data recovery software, and choose the virus infected drive, USB or SD card.

Click Scan to start scanning the drive.

Run data recovery software.

Scan and find data from the virus infected drive.

Let the program scan the selected drive and all data deleted by the virus will be found. And you can try to find them in the following tabs:

Deleted Files: If virus removed your files, you could check this tab firstly.

Drive (with your drive name): all found data will be listed out here.

Extra Files: it lists most files that lose file names and paths, you may also try to find the virus removed data here.

After finding wanted files, you can double-click on them to check out whether they are usable.

Scan device to find data.

Recover data from virus infected drive.

1. Select the removed files by the virus.

2. Specify a safe location on your PC or an external storage device.

3. Click Recover to get the lost data from your drive.

Restore lost data from drive which was infected by virus.