In this tutorial we teach you how to recover files hidden by viruses from a USB stick. Many times our USB stick or memory stick is infected by viruses for specific reasons and the virus hides the files so that we do not have access to them, however there is a way to recover those files which we will let you know next.

Note that if you deleted the files by mistake or if you already formatted the USB memory, be aware that the files are deleted, if that is your case you have to follow the steps of this other tutorial:

Recover deleted USB files

How to recover files hidden by viruses from a USB memory

Connect the USB memory to your computer. Then open the CMD. To open the CMD press the Windows + R keys and it will open execute. It is a small window in which you must write CMD.


When you type CMD press ENTER or click where it says “OK“. When you do that will open a black window in which you write attrib/? And then press ENTER. When you do that you will see something like the following:


Now you have to note which is the letter of the USB drive. You do this by going to Computer where you will see your hard drive, the partition (if you have one) and the USB memory. In my case my USB memory corresponds to the letter F, then I have to write f: and press ENTER.

Then type  attrib -r -a -s -h / s / d *. * And press ENTER.

When doing that you have to wait a few moments for Windows to scan the USB memory and recover the hidden files. When finished, you can see how the hidden files will be recovered.

After finishing recovering your hidden files we strongly recommend that you pass an antivirus to the USB memory because you could recover your files, but you have to eliminate the virus so that the problem does not happen again.

Any questions you have about how to recover files hidden by viruses from a USB stick leave a comment explaining your inconvenience.

is strongly seasoned and hard-working Graphic Designer with extraordinary creative thinking and project design abilities. With 7 years experience in print and digital, including art direction, web/mobile design and consultation, illustration, packaging and copywriting/editing for clients in fashion, pharmaceutical, furniture, automotive, food & beverage, design, hospitality, financial, broadcast and NGO. I love sharing ideas and writing articles.