How to Recover Virus Infected Files and Data – 2024 Guide

It’s happened to all of us. You’re innocently going about your day when, BAM, you open an email and your computer is infected with a virus. Suddenly everything you’ve ever typed is gone, along with all of your precious photos and files. What do you do?

First of all, don’t panic! There are steps you can take to recover your files and get rid of the virus. In this article, we’ll show you how to do both.

Page Contents

The First Encounter

If your computer is infected with a virus, there’s no need to despair. With a little know-how and some elbow grease (not really, you’ll mostly press keys and wait around), you can often clean your infected computer and recover your lost files.

There are two things you need to do when your computer is infected with a virus:

  • Remove the virus
  • Restore any lost or deleted files

Let’s take a look at how to do this – and more.

What To Do If Your Computer Is Infected With A Virus?

If you think your computer is infected with a virus, the first thing you should do is actually use your antivirus program. It will help to remove any harmful files that may be on your system.

There are many different antivirus programs available (with most of them being useless and bordering on bloatware, but what can you do), so it’s important to choose one that’s right for you. Some of the more popular antivirus programs are:

  • Bitdefender
  • AVG
  • Webroot
  • Norton 360
  • Microsoft Defender (built into Windows)

Once you have an antivirus program installed, make sure it’s always up to date. Antivirus companies release new virus defences regularly, so it’s important to have the latest updates in order to catch the newest threats.

How To Scan And Clean Your Computer For Viruses


Now it’s time to scan your computer for viruses. This process will vary depending on the program you’re using, but generally, you’ll be able to run a (full) scan by clicking a button or menu item somewhere. Also, this might take a while, so kick back, relax, and watch some YouTube videos on your phone.

During the scan, the antivirus program will look through all of the files on your computer and compare them to a database of known viruses. If it finds any matching files, it will either delete them or quarantine them (move them to a separate folder so they can’t do any damage).

Once the scan is finished, you should be virus-free! But what about all of those lost files? How do you get them back?

How To Restore Files That Have Been Infected Or Deleted By A Virus

Unfortunately, there’s no surefire way to restore all of your lost files. It really depends on how the virus deleted or infected them in the first place. However, there are a few methods you can try that may work.

First of all, check to see if the files are actually still on your computer. Sometimes viruses will delete files to the Bin or move them to a different location, but they’re not actually gone forever. Try doing a search for the file name if you’re looking for something in particular.

If the files aren’t on your computer anymore, don’t worry – there’s still hope! The next thing you can try is restoring from a backup. If you’ve been regularly backing up your files, you should be able to restore them from the most recent backup. This is by far the best way to get your lost files back, but it only works if you actually have a backup!

If you don’t have a backup, or if the files you’re looking for aren’t in the most recent backup, there are still a few things you can try. One is data recovery software as found on this website, which can scan your computer’s hard drive for any recoverable files and get them back to you in an instant.

As for the command prompt (cmd.exe) tips you can find online – forget about them. Command prompt can only help you remove the virus, but won’t do anything for recovery, so don’t bother.

Finally, inarguably the best solution would be to contact a professional data recovery service. They will most likely (there are no absolutes when it comes to file recovery) be able to help you out, but it will probably be expensive.

How To Protect Your Data From Future Virus Attacks?


The best way to protect your computer from future virus attacks is not to have a good antivirus program installed, despite what you might be led to believe. You could easily spend your life without antivirus software and never run into any issues.

How, you might wonder? By being smart and cautious.

Here’s what we mean.

  • Don’t open attachments in emails from people you don’t know, even if they seem harmless. This is internet security 101. Just don’t do it. Many viruses are spread via email attachments.
  • Be careful about what websites you visit. Avoid any site that looks suspicious, or that you don’t trust. Look at the “lock” symbol in front of the URL. If it’s closed – you’re probably good. If not – move away.
  • Keep your software up to date. Software updates almost always include security fixes that can help protect you from new viruses, and we’re not just talking about antivirus software. System updates, browser updates, drivers – all that jazz.
  • Be careful about what files you download. Only download files from trusted sources, and be sure to scan them with your antivirus program before opening them. Be especially careful with torrents (we know you use them, everyone does).
  • Use a firewall. The built-in Windows firewall will be more than fine, but a proper, third-party firewall could also help. This will help protect you from any incoming attacks.
  • Don’t click on links in pop-ups or ads! No matter how tempting they may be – don’t do it. These are always malicious. There’s no way you’re the “1,000,000th visitor” and you’ve just won 1,000 Bitcoin.
  • Just back up your data. If you’re handling sensitive data you’ll need a secure server to store your backup data on. But, if you’re just trying to make sure your projects, pictures, or music survives the infection – just upload it to the cloud. It’ll be safe there.

That’s it. Abide by those and you and your files will be fine.


So, there you have it – how to remove viruses, recover your data, and prevent any future mishaps from ever occurring.

Hopefully, we’ve quenched your thirst for knowledge and hopefully, you’re satisfied with just how easy it is to recover (and protect) your data. Take care!