Format a pen drive affected with virus

Open command prompt and type "format diskname:" without the quotes.
For example to format the d-drive of your computer type
format d:
Look out for the drive name of your pendrive and then format it.
Formatting a drive will delete all data in it!