Did you know how to remove viruses using CMD? While browsing the internet, or downloading or installing some files on your PC, you are always at risk. Hackers are there to compromise your system anytime, anywhere, and from any part of the world. One must have to follow some steps to avoid these bad guys. Computer viruses are very common nowadays. Did you face any issue of turning your files into shortcuts as soon as you copy the file to a USB .?
If yes then let me tell you your system or USB device contains some sort of virus that can remove, hide, encrypt your personal data. Some viruses like Locky virus and CryptoLocker, also know as ransomware, delete computer files and sometimes hide files from users or encrypt them.
In this article, I will explain how to remove the virus from USB and Memory Card by using the command prompt. For this purpose, we will use “attrib” command from command prompt.
You can just type help in cmd prompt; it will show you the list of commands you can use to perform different tasks using cmd prompt.
Now you can also type “help attrib” it will show the detail of attrib command.
The common attributes of attrib command are R, H, A, S
R: it show the read-only attribute of a folder or a file, it means the file can’t be executed or written.
H: It represents “Hidden” attribute.
A: A help is in preparing an archive file, it stand for archiving.
S: S stands for system file attribute.
Steps to remove the viruses:
Step1: Open Command Prompt from search and run as administrator
Step2: Type D: and press the Enter button from keyboard.
Step3: Now from D:\> type attrib and press enter. You will see the list of the viruses.
Step4: Now you have to type a simple code in your CMD prompt that is “attrib –r –a –s –h *.*, after typing it press the enter button. This code will remove the Read-only, Hidden file, archive, and system attribute from all files. The *.* for all the data having a different file extension.
Step5: Now Type autorun.inf and press enter button to delete the files.
So, these are the simple steps to remove viruses from USB by using CMD prompt. Hope this article will help you guys in removing viruses from your USB and Memory Card and don’t forget to share with your friends.