Thursday 30 September 2010

How to remove a PC virus from a USB flash drive

If you suspect that a USB flash drive (pen drive, thumb drive) is infected by a PC virus then follow these steps remove it. Make sure that the PC you use to remove the virus is already free of any infection. This information is correct at the time of publication (September 2010) but may change as viruses evolve.


1. Insert the USB flash drive. If Windows shows a dialog box and prompts to choose an action, select Cancel.







2. Open a command prompt (Start -> All Programs -> Accessories -> Command Prompt). This option may not be available if your PC is managed by an IT department.



3. Type the drive letter of the USB flash drive, followed by a colon, then press enter. For example: this could be drive E:



4. Viruses typically hide files and folders on the USB flash drive, so reset the file and folder attributes with the following command:


attrib -h -s +a -r * /s /d


5. Open the USB flash drive in Windows Explorer to view the contents with the following command (be sure to type the full stop/period afterwards):


explorer .


Note: Don't attempt to open the USB flash drive directly from My Computer (Windows Explorer), as this may activate the virus and infect your PC.


6. Delete any shortcuts (these will have the same names as any folders). Also delete the RECYCLER folder if it exists, and the autorun.ini file, if it exists.


The USB flash drive should now be free of infection.

1 comment:

Vicki Smith said...

Thanks...will now get on and try and remove everyones viruses!! Including on two of mine!