Now if somehow your Pendrive gets infected by computer viruses then you cant be able to access all the files from your Pendrive. Therefore you will be in real trouble in such a situation.
Using antivirus for removing viruses from your Pendrive is the recommended method but there is also another way you can deploy for removing viruses from Pendrive without using antivirus. In this article, I will share the second method of removing viruses from the Pendrive i.e: How To Remove Computer Viruses From Pendrive Using Widows 10 Command Prompt.
How To Remove Computer Viruses From Pendrive Using Widows 10 Command Prompt:
- Virus detection
- Delete Them
In both steps, we use Windows Command Prompt.
1)Detect Viruses Using Command Prompt:
- Connect the Pendrive with PC.
- Run Command Prompt as an administrator
- Type Pendrive location for selecting the particular drive. In my case, the location of the Pendrive is ‘F’ so I am going to select ‘F’ drive by typing F: and then press Enter
- Now type attrib. It will list out all unwanted hidden and read-only files or folders from the Pendrive. You can say these are the list of viruses that exist in the Pendrive
2)Remove Viruses Using Command Prompt:
attrib -h -r -s -a *.* and press Enter.
- h represents the hidden attribute
- r represents the read-only attribute
- s represents system file attribute
- a represents archive attribute
- *.* represent all the files with all different types of file extensions. And
- ‘-‘ represent removing an attribute
2. To delete this using command prompt, type del file location filename and press Enter. For example, del C:UsersG~NOXDesktop svchost.exe and press Enter. Once you have pressed enter, that file should get deleted from the current drive.