Know How to Remove Virus From Pen Drive Using DOS Commands ?

author
Published By Jamie Kaler
Rollins Duke
Approved By Rollins Duke
Published On November 28th, 2023
Reading Time 4 Minutes Reading
Category Tips and Tricks

One of the easiest ways in which your system can get infected with viruses is by pen drives. The viruses in pen drives or flash drives propagate in the user system and in turn corrupt the data in the system. There are various kinds of viruses that infect the pen drive like Ravmon, ‘Orkut Is Banned’, Shortcut Virus, etc. Once the pen drives, get infected the query it can be removed by using Dos commands. However, the problem, which strikes the naïve users, is How to Remove Virus from Pen Drive Using DOS ?

If you are looking for a solution to Recover Pen Drive corrupted data, then follow this link.

Symptoms Of Virus Infected Pen Drives

Consider a scenario when you plugin your pen-drive in your colleague’s system to copy some data. After a while, when you plug in the drive in your system you observe that the files or data which were already present in your pen drive before copying are missing and also the recently added data is missing. Even if they are present, you will observe that they are present in the form of icons and shortcuts. When you click on these icons, no file will open for you. If the same situation is happening with your pen drive, then it is a sure shot that your pen drive has gone corrupted.

Reasons for Pen Drive Corruption

Pen drives are the most convenient source of transferring data between different systems. Due to this very reason, viruses and different malware easily navigate in systems through these pen drives. Most viruses can be detected by anti-viruses but some of them go undetected. Pen drives can enter in the pen drives if the data downloaded from the internet has been copied to the pen drive. The downloaded data may contain some viruses and will cause virus infection in the pen drives. These pen drives when attached to another machine infect them in turn. As a result, all the machines coming in contact with the pen drive may result in getting infected with viruses.

Know some CMD Commands and its uses

In this article, we will explain the solution to remove viruses from Pen Drives, Memory Card, etc. devices. Microsoft Windows comes with a free CMD utility to access DOC in Windows environment. To remove the virus using Cmd, we will use a famous cmd command called ‘attrib’ command. First of all, we will think better about those orders we are using.

ATTRIB [+ attribute | – attribute] [pathname] [/S [/D]]

Here are the basic attributes of the ‘attrib‘ command:

R – It will represent the “Read-only” attribute.

H – It will show the all “Hidden” attribute.

A – Show all “Archiving” attribute.

S – the “System” attribute.

I – “not content indexed file” attribute.

How to Remove / Delete Virus from Pen Drives using CMD in Windows ?

One of the easiest ways to remove the virus from pen drives is by using DOS command prompt. But the users who are unaware of the Dos commands may think How to Remove Virus from Pen Drive Using DOS commands? For this, the users need to insert their virus infected pen drive into a system that is updated with the latest version of anti-virus software. Once the scanning of the pen drive is finished, start fixing your pen drive by using cmd command.

  • Type Run command in the search option.
  • In this type cmd to open the command prompt.
  • Run the following command in command prompt
    attrib –h –r –s <Drive Letter>:\*.* /s /d

In the drive letter, type the name of the drive, which denotes your pen drive.

  • Press
  • Type Del Autorun.inf.
  • Press Enter.

External Application to Remove Virus from Pen Drive

If the above process fails and the viruses in the pen drives do not get removed and also lead to data loss, then the only solution left is to deploy a third-party application. One such application is Data Recovery Software, which recovers the entire deleted data from virus infected USB drives. In addition, it offers variant recovery modes that result in an effectual way to carry out the recovery. The application is compatible with all Windows OS to recover the data. The software is designed in such a way that it recovers the data in an exact form without losing a bit of data information.

Conclusion

Data is the most important thing for the continuity of work whereas the most drastic situation is when the user’s data get corrupted due to virus attack. In the following section, we have discussed the way to remove Virus from Pen Drive by using DOS command along with this a trouble-free way is also discussed.