Viruses are different and they can perform different actions too. For example, some viruses are able to hide real folders on a USB flash drive, replacing them with their own shortcut with the same name. Getting rid of such a virus is not so difficult.
The reason is in the virus
Sometimes, when you connect a USB flash drive to a computer, you may find that all folders are displayed as shortcuts. And thus the user cannot access the contents of the folder. In addition, some also start to panic and try to open all the folders one by one, or even format the entire removable disk. Formatting will only aggravate the situation, since all files on the flash drive will be erased.
And the data from the flash drive did not disappear anywhere and nothing happened to them. They both were on the flash drive and remained there, and the reason that the folders have now become shortcuts is a virus. And you also need to know that in no case should you open these shortcuts. This will only activate the virus, and if antivirus software has not been installed on the computer, the consequences can be dire.
How do I restore folders to work?
In order to restore the functionality of the folders, you need to find and destroy the virus. In this case, the executable file of the virus with the extension ".exe" is to blame. The easiest way to do this is using an antivirus by running a flash drive scan for viruses.
You can also find the executable file manually. First, you need to enable the display of hidden folders and files. To do this, go to the "Control Panel" through the "Start" menu, then select "Appearance and Personalization", then "Folder Options". In the window that appears, go to the "View" tab and select "Show hidden files" at the very bottom. You can also go to "My Computer", select "Tools" in the menu bar, then "Folder Options" and in the window that opens, specify that hidden files are displayed.
After that, you need to open the flash drive and check all hidden files. You need to check the properties of each shortcut and pay special attention to the "Object" item in the "Shortcut" tab. Typically, all shortcuts run the same executable file, and you need to figure out which folder it is in. The line of malicious code in the "Object" field may be long, but you need to find in the line something like the following piece - "RECYCLER / 5fa248fg1.exe". The file "5fa248fg1.exe" is a virus (the combination of numbers and letters will be completely different), and "RECYCLER" is the name of the folder in which this virus is located. In this case, you need to delete this folder, and after that, launching shortcuts will no longer pose any danger.
After removing the virus, it remains only to return the folders to their previous appearance. To do this, you need to delete all the folder shortcuts, while all the data on the flash drive will still remain, they are simply invisible. Then you need to select the "Run" item from the "Start" menu, type in the search bar "cmd" (without quotes) and click "Enter". In the window that opens, you need to enter the command "cd / df: " (instead of the letter "f", you must insert the literal value of the flash drive) and press "Enter", and then enter "attrib -s -h / d / s" and press "Enter ". After this procedure, the folders on the flash drive will become visible.