Download ArticleDownload Article

It is common these days to lose your data due to virus affecting you flash drives, memory cards etc. The virus can be removed and the data can be recovered easily by using the command prompt. Just follow the simple steps.

Part 1
Part 1 of 2:

Making sure the data can be recovered

Download Article
  1. How.com.vn English: Step 1 Open the drive that contains the virus.
  2. How.com.vn English: Step 2 Press Ctrl+A to select all.
    Advertisement
  3. How.com.vn English: Step 3 Hit Alt+Enter to view properties.
  4. How.com.vn English: Step 4 Note the total space consumed by the data of the drive.
  5. How.com.vn English: Step 5 Compare it to the used space of the drive.
    If the used space exceeds the total size of the data, then it is possible to recover the lost data.
    • In other words, if the drive is showing more space consumed than the actual data inside the drive, then your lost data can be recovered.
  6. Advertisement
Part 2
Part 2 of 2:

Removing virus and recovering data through cmd

Download Article
  1. How.com.vn English: Step 1 Press Ctrl+R at the desktop.
  2. How.com.vn English: Step 2 Type cmd and hit Enter.
  3. How.com.vn English: Step 3 Type the command:
       attrib -a -r -h -s /s /d x:\*.*
  4. How.com.vn English: Step 4 Replace x with the drive letter and hit Enter.
    • The drive will now contain a folder without any name. This folder contains your lost data.
  5. How.com.vn English: Step 5 Delete any unnecessary files that you see such as autorun.inf, recycle.bin etc.
  6. How.com.vn English: Step 6 Backup your data and format the drive, if possible.
  7. Advertisement


Community Q&A

Search
Add New Question
  • Question
    When you click properties on This PC or My computer, there is "Tools", when you click it, what do "Error Checking" do? Since my laptop always get lag/stuck at desktop after login.
    How.com.vn English: Evan Boehs
    Evan Boehs
    Community Answer
    Try installing an antivirus if you can, otherwise you will need to identify the file first, and then Search for the CMD in the start menu, press right click on the CMD icon and hit “Run as Administrator” Now, type wmic and hit Enter (c:\Windows\system32>wmic). You will see a wmic:root\cli>. Now type “product get name” (wmic:root\cli>product get name). Now, you will see a list of all programs installed using Windows installer. Now type, product where name=”name of program” call uninstall and press enter. (wmic:root\cli> product where name= “name of program” call uninstall). Also, if you can, open task scheduler and look there to check that it won't run at startup!
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
      Advertisement

      Tips

      • If the above method doesn't work, try using the command prompt as Administrator.
      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Thanks for submitting a tip for review!
      Advertisement

      Warnings


      Advertisement

      About This Article

      How.com.vn is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, 13 people, some anonymous, worked to edit and improve it over time. This article has been viewed 66,326 times.
      How helpful is this?
      Co-authors: 13
      Updated: March 26, 2019
      Views: 66,326
      Thanks to all authors for creating a page that has been read 66,326 times.

      Is this article up to date?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement