How to Format Pen Drive Using Cmd to Remove Virus

Pen drives have became one of the easiest & fastest media to transfer your data from one computer to another. As we usually connect these pen drives in different computers there are lots of chances of getting your pen drive infected with viruses and malwares. If you try to delete such  viruses (Like file.exe or autorun.exe) then it won’t get deleted instead it will simply replicates itself again and again. So to get rid of such viruses we need to format our pen drive. But there may be certain occasions when you simply can’t format your pen drive by right clicking and selecting format as the virus script inside the pen drive do not allow such things.

So in such case we can use windows command prompt utility to format our pen drive. Using command prompt we can low level format our pen drive so that it permanently removes viruses and malwares. In-fact this method also help us to fix a corrupt pen drive

Step to Format Pen Drive Using Cmd 

  • First of all plug in your pen drive.
  • Hit windows + R to launch the run window.
  • Type cmd and hit enter. This will launch command prompt.
  • Now open Computer and note down the drive letter of your pen drive, It will be listed under devices & drives category and the drive letter may be like G, F etc.

  • Now switch to command prompt type – Format <drive letter> : 
  • In my case my drive letter is F so I shall type the following command and hit enter

Format F:       // Hit Enter

Pro Tip – If you want to format your drive in FAT32 or NTFS file system the use the following command.
For FAT32 – Format <drive letter>: /FS: FAT32
For NTFS   – Format <drive letter>: /FS: NTFS
  • Now it will show something as shown below :

  • Simply hit enter and it will start the formatting process. It may take up-to 10-15 minutes as its going to low level format your pen drive.
  • At last it will ask you to enter a new name for your pen drive, So choose a name and hit enter to complete the formatting procedure.

So this was one of the best method to format your pen drive using command prompt in order to remove viruses and malwares. As said earlier you can also use this method to fix a corrupt pen drive.


Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.