How to Scan a File for Viruses

How to Scan a File for Viruses

Scanning a file for viruses is as important as removing the viruses.  Most devices offer a built-in scanner on the system. However, you can also scan a file for viruses using a third-party service.  A virus scan can perform lot of activities on your system.  Explore a scanning program below and learn how to scan a file for viruses.


If you are unsure using for using antivirus software, we recommend you to download easy to use Waredot Antivirus software for perfectly scanning process on your system.

How to scan a file for viruses windows 10

Microsoft Defender called “Windows Defender” on Windows 10 always scans files before you open them unless you’ve installed a third-party antivirus. You can also perform a quick scan for any file or folder, too. Let’s see how.

1. First of all, locate the file or folder you want to scan. Go to File Explorer and find it in the file menu location where you stored it.  Once you find the file, right-click on the file or folder. 

2. Once you right-click on the file or folder, it will open the options menu.  From the menu, select “Scan with Microsoft Defender.” 


Note: On earlier versions of Windows 10 to the May 2020 update, this option will stay “Scan with Windows Defender.”

3. A Windows Security window will pop up now, and the results of the scan will be shown near the top-right below the “Scan Options” heading. Now, you may see “No current threats.”

4. On the other hand, if malware is detected, Microsoft Defender will alert you with a message that says, “Threats Found,” and doing so will list the file or files that are infected.

5. Now, click on the “Start Action” button to remove the threat.  Once you click on it, Microsoft Defender will start removing all the threats automatically, and once it will be done, everything will back to normal.


Note: If you want details about the result that came out, you need to click on “Protection History” just below the scan results.

How to Scan a File for Viruses using Command Prompt

You can find multiple ways to use Microsoft Defender or to scan a file for viruses with Microsoft Defender using the command prompt. 

To scan a specific file or folder manually using a command prompt, follow the below steps:

Go to the search bar option at right on the Start button and search for Command Prompt.  Now, right on the top result, and select the Run as administrator option. 

Now, type the following command to access the platform folder and press Enter.

  • cd c:\ProgramData\Microsoft\Windows Defender\Platform 

Enter the following command to identify the latest version of the antivirus command tool and press Enter. 

  • dir

Enter the following command to access the folder with the latest version and press Enter.

  • cd 4.18.2009.7-0

In the command prompt, replace “4.18.2009.7-0" with the latest version of the folder available on your device.

Now, you need to type the following command to scan a specific folder and press Enter

  • mpcmdrun -Scan -ScanType 3 -File "C:\PATH\TO\FOLDER"

Now, in the command, replace "C:\PATH\TO\FOLDER with the path to the folder you’d like to scan. 

For instance: notice that this command scans all the contents in the “Files” folder. 

  • mpcmdrun -Scan -ScanType 3 -File "C:\Users\username\Downloads\files"

Now, type the following command to scan a specific file and press Enter. 

  • mpcmdrun -Scan -ScanType 3 -File "C:\PATH\TO\FILE.TXT"

Now, while staying in the command, replace "C:\PATH\TO\FILE.TXT" with the path to the folder you’d like to scan. For instance: this command scans the file names “image-1.jpg” inside the “files” folder:

  • mpcmdrun -Scan -ScanType 3 -File "C:\Users\username\Downloads\files\image-1.jpg"

Now, Microsoft Defender will scan the files. It may that once the file cleans, make sure you check the files for viruses because Windows may not notify once the file cleans. 

How to Scan a File Virus Before Using Them 

To avoid getting your computer infected by malware, make sure you scan files before executing them.  Yes, you can do so. Here we will discuss a couple of options that will help you scan files easily from the computer.  

Antivirus Software

You can see that antivirus software will out an option in the context menu so you can scan individual files. Once you download a file or email attachment, simply right-click on the file and choose the option to scan with your Antivirus software. 

Now, if you want to scan more than one file at a time, then hold down the Ctrl key while you clicking each file you want to scan. Then right-click and select Scan with your Antivirus software.

If you’re already downloaded the antivirus software, that may also appear in the option. You can select them also, otherwise, we recommend you to choose the Microsoft Defender as the best option or Microsoft Security Essentials scanning a couple of files. 

When or if the virus is found, the Antivirus software will neutralize the virus.

Virus Total Uploader 

You might want to check out VirusTotal Uploader for the best virus scanning.  This is one of the best handy software that will scan your files with 41 different antivirus software online. After installing VirusTotal Uploader, right-click on the file, and go to Send To, then VirusTotal.

Alternatively, you can launch the VirusTotal Uploader and click “Get and Upload File. 

Now, it will send the file to and scan with 41 different Antivirus apps and show you the results. 

If you don’t want to install the Uploader, you can go to the VirusTotal site and upload a file from there to scan. 

Note that sometimes you will be shown the false-positive detected on files we know are clean. The definitions database of the Anti-malware app isn’t current, or an obscure Antivirus App will find something questionable.  If that is the case, use your best judgment when viewing the results.

How to Scan Google Drives for Viruses

Users can use Google Drive cloud to scan suspect files. It protects you from harmful viruses and malware and allows you to protect your data. The use of a Virus Scanner with Google Drive is one solution for scanning Google Drive for viruses.

This will detect viruses or spyware on your documents without the installations of antivirus software. It protects you against damaging viruses, malware, and spyware to enable you to maintain secure private information. 

Here’s how to scan Google Drive for viruses: 

1.Open Google and type Virus Scanner with Google Drive in the search bar, and it will show you the various options; make sure you click on the first option.  Take the image help, how the website will appear.

2. Note that a virus scanner with Google drive is opened. You need to click on Visit Website button. Once you click on the button, the following screen will appear: 

3. Now, select the Button that says Select Files from Google Drive. As you will click on the button, the options menu will appear.


4.  Click on the button that says Login & Authorize. It will prompt you to log in with Google Drive. Enter the login details now.

5. Notice that all the files of Google Drive will appear on the screen. Select any one file which you’d like to scan and click the Select button. Once you select the files, they will appear in the text area. Now, click on Start Virus Scan button to scan selected files as follows: 

6. Now, once you click the Start Virus Scan button, the progress log will appear. Once it will be done, the scanning process ends here.

How to run a Virus Scan on Google Chrome 

Google Chrome can also help you to scan for the viruses: 

1. First of all, open Google Chrome and click on the three dots in the top-right corner and choose Settings.


2. Now, scroll to the bottom and click Advanced. Scroll down again and select Clean up computer.

3. Now, click Find. You should uncheck the Report Details filed below to avoid giving additional info to Google.

4. Wait for Google to Report whether any threats were found. If Chrome finds any malicious software, it will prompt you to remove it. 

5. Now, click on Remove to remove the malicious items. You might need to restart your computer afterward. 

6. Make sure that this tool for threats that do not comply with Google’s unwanted software policy. It’s for Windows only, too.


Hey guys! This was the guide about “how to scan a file for viruses.”  Here, you can the various ways for virus scanning on Windows.  You can notice that we did not include any third-party scanner in this article. Windows offers the best built-in scanner program to scan a file for viruses. 

Please let us know in the comment section if you’ve any queries regarding this article. We would glad to answer you!


Secure You PC Now With Award Winning Security.

Protects your PC from viruses, spyware, Trojans and other malicious programs.


Available in Windows 11, 10, 8, 7, Vista, XP

Waredot Tech-Team is a group of professional writers and editors. Waredot’s article written by a trained team of writers and researchers who passionate about writing. We love to share ideas and that every information you can trust. Our Content Management Team closely monitors the work of our editorial team to ensure that each article is well-researched and up to our high standards.

Leave a Reply     

Your email address will not be published. Required fields are marked *