How To Locate Viruses Using The Attrib Command: 11 Steps - WikiHow
Maybe your like
- Log in / Sign up
- Opening Command Prompt |
- Locating and Deleting Viruses |
- FAQ |
- Video
This article was co-authored by Efficient IT Services and by wikiHow staff writer, Jack Lloyd. Efficient IT Services is an IT support service provider based in Anderson, South Carolina. They provide proactive, reliable residential IT services and local IT support for businesses in Anderson, Greenville, and Upstate South Carolina. Their services include providing managed IT services, cybersecurity solutions, network systems support, and computer support services. The team is highly experienced and stays current on the latest training and relevant industry standard certifications (DELL, CCNA & CCNA Security) to provide the highest quality of service to customers. Efficient IT Services takes pride in its work and provides IT services to help its community and drive the local economy forward. This article has been fact-checked, ensuring the accuracy of any cited facts and confirming the authority of its sources. This article has been viewed 743,711 times.
This wikiHow teaches you how to find and remove a virus that you know by name from your Windows computer. To do so, open the Command Prompt as an administrator and type your directory name. Find your virus, and then run the delete prompt.
Quick Steps
- Open the Command Prompt.
- Type your directory name and press Enter.
- Type attrib -r -a -s -h *.* and press Enter.
- Find your virus name.
- Type del [virus name] and press Enter.
For popular FAQs on using command prompt to locate viruses, jump to more common questions.
Steps
Part 1 Part 1 of 2:Opening Command Prompt
-
1 Open the Start menu. Click the Windows logo in the bottom-left corner of the screen, or press the ⊞ Win key on your keyboard. - For Windows 8, place your mouse cursor in the top-right corner of the screen, then click the magnifying glass icon when it appears.
-
2 Type command prompt into the "Search" field. Doing so will search your computer for the Command Prompt app, which will pop up at the top of the search menu. - If you're using Windows XP, you'll instead click the Run app on the right side of the Start menu.
-
3 Right-click Command Prompt. It resembles a black box. Doing this will invoke a drop-down menu. - If you're using Windows XP, you'll instead type cmd.exe into the Run window.
-
4 Click Run as administrator. It's near the top of the drop-down menu. Doing so will open Command Prompt with administrator privileges. - You'll need to confirm this choice by clicking Yes when prompted.
- If you're using Windows XP, you'll click OK to open Command Prompt.
- You won't be able to run Command Prompt in administrator mode if you're on a restricted, public, or networked computer (e.g., a library or school computer).
Advertisement
Locating and Deleting Viruses
-
1 Type in your directory's name. This will typically be the letter on the disk drive (e.g., "C:"). -
2 Press ↵ Enter. This will change the Command Prompt's search location to your selected directory. -
3 Type attrib -r -a -s -h *.* into Command Prompt. The "attrib" command forces all hidden, read-only, archived, and system files to display in Command Prompt, and the "-r -a -s -h *.*" section of the command removes these attributes from non-legitimate files. - Any legitimate system files won't have their attributes removed, and you'll see "Access Denied" listed to the left of them.
-
4 Press ↵ Enter. Doing so will display all previously hidden system files' names. -
5 Scroll up to find your virus. If you know the virus' name, you'll simply need to scroll up to it. Otherwise, look for files ending in ".inf" and ".exe" that don't look familiar. - Before proceeding, be sure to double-check any file names you suspect of being viruses by looking them up.
- Common virus names include "autorun.inf" and "New Folder.exe".[1]
-
6 Type del [file name] and press ↵ Enter. Doing so will remove the virus from your computer.[2] - For example: to delete the "autorun.inf" virus, you'd type in del autorun.inf.
-
7 Close Command Prompt. The virus should no longer affect your system. You may even notice a slight increase in computer running speed or app response time. Advertisement
Common Questions: Removing Viruses with CMD
Can I find malware with the Command Prompt?
You can find viruses and malware with the Attrib command in Command Prompt. Once located, you can delete them from your computer.
How do I clean my computer using CMD?
Use the command: attrib -r -a -s -h *.* to find any viruses on your computer. If you find any, use the command: del [virus name].
What is the CMD.exe virus?
This virus mimics the Command Prompt, an application that comes with your device. If you suspect you have a virus, consider running an antivirus scan if nothing comes up in the Command Prompt.[3]
Video
Tips
Submit a Tip All tip submissions are carefully reviewed before being published Name Please provide your name and last initial Submit Thanks for submitting a tip for review!You Might Also Like
References
- ↑ https://fossbytes.com/remove-virus-using-cmd/
- ↑ http://www.easeus.com/resource/use-cmd-remove-virus-windows-10.html
- ↑ Efficient IT Services. IT Support Expert. Expert Interview
About This Article
1. Type "cmd" into the Windows search bar. 2. Right-click Command prompt. 3. Click Run as administrator. 4. Click Yes. 5. Type "cd ' and press Enter. 6. Type "attrib –r –a –s –h *.*" and press Enter. 7. Look for the virus in the list of files. 8. Type "del " and press Enter. Did this summary help you?YesNo
In other languages Spanish Portuguese Russian French Indonesian Dutch Arabic Chinese- Send fan mail to authors
Reader Success Stories
-
Herry Casillas
Dec 6, 2016
"Yes, it did help. Before reading this info, I honestly had no idea what I was dealing with or what to even look for, but now I'm up to date."..." more
Is this article up to date?
Yes No Advertisement Cookies make wikiHow better. By continuing to use our site, you agree to our cookie policy.Herry Casillas
Dec 6, 2016
"Yes, it did help. Before reading this info, I honestly had no idea what I was dealing with or what to even look for, but now I'm up to date."..." moreBalveer A.
Feb 3, 2017
"Thanks heaps! You are so helpful, as always." Share yours! More success stories Hide success storiesQuizzes & Games
You Might Also Like
Featured Articles
Trending Articles
Featured Articles
Featured Articles
Watch Articles
Trending Articles
Quizzes & Games
- Categories
- Computers and Electronics
- Computers
- Computer Viruses
- Home
- About wikiHow
- Experts
- Jobs
- Contact Us
- Site Map
- Terms of Use
- Privacy Policy
- Do Not Sell or Share My Info
- Not Selling Info
- Contribute
Follow Us
×wikiHow Tech Help:
Tech troubles got you down? We've got the tips you need
Subscribe You're all set! X --Tag » How To Remove Virus Using Cmd
-
How To Remove Virus Using CMD In Windows 10
-
How To Use CMD To Remove Virus From Any Drive In Windows 10/11
-
Tutorial To Remove Virus Using CMD In 4 Steps - Gamespec
-
How To Remove Virus From USB Or Any Drive On Windows 10 ...
-
Remove/Delete All Computer Viruses Using Cmd Prompt In Just Easy 8 ...
-
Remove Virus From Your PC Using Command Prompt (cmd)
-
How To Remove Virus Using CMD In Windows 10 Or 11 - YouTube
-
How To Remove Computer Virus Using CMD - WeTheGeek
-
How Can One Delete A Virus Or A Malware Using CMD? - Quora
-
How To Remove Different Viruses Using CMD (Command Prompt)
-
How To Locate And Remove Virus Using Command Prompt - Tech Wema
-
Remove Malware From Your Windows PC - Microsoft Support
-
How Can I Remove Virus Using Cmd? - MejorSoftware
-
Computer Hardware & Networking - How To Remove Virus Using Cmd ...