Pen drive detected but not showing data

Many people come to our Technical Service worried because the files they had saved on their flash drives (memory cards, pen drives, etc.) were deleted and now there is only one direct access that leads nowhere.

The good news is that your files have not been lost!… And I will explain how you can recover them yourself!

This problem is caused by a virus that generally gets into the drives from public access computers such as schools, internet cafes, etc., but don’t worry, it can be repaired.

The files are not damaged, much less deleted … they were only hidden, but they are still there. To be sure, you can check the space used in the device properties and see that it is still apparently empty, that “empty” still occupies MB.

So, to recover the files we must  follow very simple steps using the Windows command interpreter.

Note: The steps explained here are a reference to solve your problem, read them all first and evaluate if what is explained here applies to your situation. If so, you can follow them at your own risk.

Steps to recover hidden files

  1. Insert the USB device into the computer, wait for it to be recognized.
  2. Verify the letter assigned to the drive (if you don’t know how to do it, you can look at the image).
  3. Access the Command Interpreter (the simplest thing is to press the Windows key + R and write in the dialog that appears “cmd”)
  4.  Write <letter assigned to the unit> + <:> … in the case presented in the image it would be “F:”
  5.  Enter the Following Command  attrib -h -r -s *. * / S / d
  6.  Wait… (if there are many files, it will take a few minutes).
  7.  Once the Interpreter shows “F: >” again, the process is completed.
  8. If you have an antivirus installed (which should always be the case), run the quick scan on the unit 
  9. Access your Unit with Windows Explorer as you normally do.
  10. Check the files and folders that appeared, many times they may have a different name than they had, but your files may be there.

An example image:



The attrib command is used to Show or Change the attributes of a file, with the modifiers “-h -r -s *. * / S / d” we specify that:

    • Remove the attributes of: Hidden, read-only, and file from the system.
    • Let him apply it to everything he finds.
  • And that includes the current folder and all subfolders.

Therefore it is important that the command is written with all the mentioned parameters.

Here is the syntax of the Attrib command


Show or change the attributes of a file.

ATTRIB [+ R | -R] [+ A | -A] [+ S | -S] [+ H | -H] [+ I | -I]
[drive:] [path] [filename] [/ S [/ D] [/ L]]

+ Sets an attribute.
– Delete an attribute.
R Read-only attribute of the file.
A Archive file attribute.
S System files attribute.
H Hidden file attribute.
I No content indexed file attribute.

[drive:] [path] [ filename ]
Specifies the file or files that will be affected by ATTRIB

/ S Processes matching files in the current folder and all subfolders
/ D Also processes folders.
/ L Work on the attributes of the symbolic link instead of
the target of the symbolic link

Leave a Comment

Your email address will not be published. Required fields are marked *