How to remove virus that hides folders from pen drive

2 min read

pen drive

It’s not common for you to get one virus on a pen drive that hides folders and files, or turns them into shortcuts, leaving everything you had inside inaccessible. Calm down: there’s a way to recover your flash drive and the files inside with a few tricks, without having to format it.

pen drive

This usually happens when you plug the device into some public computer and the flash drive catches the virus from that computer. There are a few different types of viruses, but the biggest problem encountered is when folders become shortcuts and you can’t access anything that was there before. If you right-click on the pen drive, go to Properties and see that there is space used, you will probably be able to recover your files. Turns out they are still on the flash drive, but in hidden mode.

Remove virus and recover pen drive on PC (Windows)

windows arquivos ocultos

Before you take out the virus and recover your files from the pen drive, you need to see the hidden folders of your system and your device. To do this, follow the steps below:

  1. In Windows 8 or 10, hit the start button, search for Folder Options and hit Enter. On Windows 7 or lower, enter Start > Control Panel > Appearance and Personalization > Folder Options;
  2. uncheck the option “Hide protected operating system files” and select Show hidden files, folders and drives under Hidden Files and Folders;
  3. Click OK.

Now, delete the shortcuts that are on the flash drive (they are made to mimic folders), but be careful not to confuse them with your real files. The second step is to leave the files unhidden and access them normally. Follow the steps below:

terminal windows
  1. Hit the start button, type cmd and press Enter;
  2. Type the letter that indicates the drive of your flash drive followed by a colon (:). For example, D:.
  3. then type attrib -r -s -h /s /d D:\*.*also exchanging D: by your drive letter;
  4. Press Enter.
READ  Top 5 Samsung Phone Unlock Software

Then, run some antivirus recommended in this post to remove the virus from the pen drive or computer and that’s it! It’s probably all right now. But, for your safety, it’s good to do some checks beforehand. After running the antivirus, make sure you don’t have any strange files on the flash drive that you’ve never put or seen before.

If you want to make sure your files won’t be compromised, copy them to your computer, format the flash drive following this tutorial and when the formatting is done copy the files back to the flash drive.

Remove virus and recover pen drive on Mac

There is also the possibility that you can use a Mac nearby to recover the flash drive. Follow the steps below to recover the files:

  1. open the app Terminal along the way Applications > Utilities > Terminal;
  2. enter the command defaults write AppleShowAllFiles TRUE;killall Finder. Now you will be able to see the hidden files on the flash drive;
virus pen drive mac

Now search all your folders and files among other strange folders and files. On the pen drive I accessed, all the files were inside a folder with a blank name, so I just had to copy everything to a folder inside my computer, format the pen drive to get rid of the virus and move the files again.

However, there is also the possibility of all files are hidden instead of being located in a single folder. If this happens, enter the Terminal again and follow the steps below:

terminal mac esconder
  1. Type the command chflags nohidden (that’s right, with a space after the command);
  2. drag the files which are hidden to the Terminal and then press enter;
  3. type it defaults write AppleShowAllFiles FALSE;killall Finder to disable viewing of hidden files.
READ  Top Mac Malware and Security Vulnerabilities

Ready! Files are no longer hidden. If you want to make sure you don’t get a virus again, delete extraneous files that you don’t remember putting, run the flash drive in some antivirus in Windows, or format it following this tutorial (but don’t forget to move the files out of the flash drive before!).

Leave a Reply

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