Fix: Restore Files on a Flash Drive Hidden by Virus

When a virus infects a Flash Drive it some times hides the files you had in there. What these viruses usually do is modify the attributes and parameters of the folders which hides the files.

It is very simple to revert the attributes to view the hidden files. However, if the the files have been deleted then it may not be possible to retrieve them and you may need a data recovery company.  In this guide i will list available methods with which you can restore/recover hidden files from Flash drives.

This method works on Windows 7 / 8 & Vista.

Using the attrib commands from command prompt

First, ensure that the drive you are trying to restore is connected.

Then, hold the Windows key and Press E. To open My Computer.


Check what the “Drive Letter” is.

Then Click Start and Type cmd. From the results displayed Right Click on cmd and Select Run As Administrator. The black window which has now opened is your command prompt.

In the command prompt, type the drive letter followed by, eg: if you noted that the drive letter was E then type E:

In the picture above, the  highlighted drive letter is D:


Then type attrib -s -h *.* /S /D and Hit Enter.



If for some reason you are unable to enter into the  drive then you may run the  command attrib d:*.* /d /s -h -r -s where d: is the drive letter from a different path.



You may also run Kaspersky Anti Virus to scan your USB drive. The methods above does not removes the virus from the drive, it only changes the attribs and reset permissions and parameters to bring back the files hidden by the virus. The Anti Virus will ensure that your USB Drive is clean of any viruses.

Kevin Arrows
Kevin is a dynamic and self-motivated information technology professional, with a Thorough knowledge of all facets pertaining to network infrastructure design, implementation and administration. Superior record of delivering simultaneous large-scale mission critical projects on time and under budget.

Expert Tip

Fix: Restore Files on a Flash Drive Hidden by Virus

If the issue is with your Computer or a Laptop you should try using Restoro which can scan the repositories and replace corrupt and missing files. This works in most cases, where the issue is originated due to a system corruption. You can download Restoro by clicking the Download button below.

Download Now

I'm not interested