USB flash drive or Pen drives have become 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 malware. If you try to delete such viruses (Like file.exe or autorun.exe) then it won’t get deleted instead it will simply replicate 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.
Step to Format Pen Drive Using Cmd
- First of all plug-in your pen drive to your PC.
- Hit Windows + R to launch the run window.
- Type cmd and hit enter. This will launch the 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
- 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 it is 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 methods to format your pen drive using the command prompt in order to remove viruses and malwares. As said earlier you can also use this method to fix a corrupt pen drive.