Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

How to Locate Viruses Using the Attrib Command

Learn how to locate viruses using the attrib command with clear steps, practical context, and useful troubleshooting guidance.

Table of Contents

This updated guide examines How to Locate Viruses Using the Attrib Command and organizes the essential facts, background, and practical takeaways in clear American English.

Part 1of 2:

Opening Command Prompt

  1. How to Locate Viruses Using the Attrib Command — contextual image 1 Open the Start menu. Click the Windows logo in the bottom-left corner of the screen, or press the?Winkey 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. How to Locate Viruses Using the Attrib Command — contextual image 2 Typecommand promptinto 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. How to Locate Viruses Using the Attrib Command — contextual image 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 typecmd.exeinto the Run window.
  4. How to Locate Viruses Using the Attrib Command — contextual image 4 ClickRun 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).

Part 2of 2:

Locating and Deleting Viruses

  1. How to Locate Viruses Using the Attrib Command — contextual image 5 Type in your directory's name. This will typically be the letter on the disk drive (e.g., "C:").
  2. How to Locate Viruses Using the Attrib Command — contextual image 6 Press?Enter. This will change the Command Prompt's search location to your selected directory.
  3. How to Locate Viruses Using the Attrib Command — contextual image 7 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. How to Locate Viruses Using the Attrib Command — contextual image 8 Press?Enter. Doing so will display all previously hidden system files' names.
  5. How to Locate Viruses Using the Attrib Command — contextual image 9 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. How to Locate Viruses Using the Attrib Command — contextual image 10 Typedel [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 indel autorun.inf.
  7. How to Locate Viruses Using the Attrib Command — contextual image 11 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.

FAQ

What is How to Locate Viruses Using the Attrib Command about?

It provides a structured overview of command, explains the main context, and highlights practical takeaways for readers.

Why does this topic matter?

Understanding the main concepts helps readers evaluate the issue, avoid common mistakes, and make better-informed decisions.

How should readers use this information?

Use the guidance as a practical starting point, confirm details that may have changed, and follow current product, safety, or security recommendations.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.