We have to insert our pendrive (flash drive) at cyber cafes or other public places. So, it is almost impossible for us to ensure that systems we plug into are malware-free. As a result, we experience a recurring problem of our pendrives becoming infected.

One type of malware that has been a problem is a shortcut virus, which renders all my pendrive folders hidden. When I view the drive contents, I see nothing except a shortcut file. But my folders appear when I search.

How to solve this?

  • what is "shortcut virus affected PC" ? a pc infected with virus?
    – Kelmen
    Dec 4, 2015 at 2:56
  • @Kelmen Yes, "a pc infected with one kind of virus that makes all folders in it hidden and create a shortcut file", sorry for my bad English. Dec 4, 2015 at 3:05
  • @manetsus - If you realize the grammar is bad you should take steps to correct it.
    – Ramhound
    Dec 4, 2015 at 11:42
  • @Ramhound Go ahead, the edit button is there for other users for a reason.
    – AStopher
    Dec 4, 2015 at 12:35
  • 1
    @cybermonkey - I encourage people to fix their own mistakes. I leave my editing duties to things they cannot do because of their reputation. I also leave fixing grammatical mistakes to people that are better at that particular skillset.
    – Ramhound
    Dec 4, 2015 at 12:47

1 Answer 1


Press Win + R, type cmdin "Open:" field. Then click "OK" or enter. This would bring you to the command line terminal.

Then type the following command replacing X with the drive letter of your flash drive/pendrive and then enter:

attrib -h -r -s /s /d X:\*.*

If you eager to see more about this command see this documentation from microsoft.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.