You have noticed that the capacity of your USB flash drive has decreased during use. Sometimes it shrinks in a very significant way. Most likely, this was the result of exposure to viruses. In this case, you can return the drive to its original size.
Necessary
- - computer;
- - anti-virus program with the latest updates;
- - file manager Total Commander;
- - utility h2testw.
Instructions
Step 1
Turn on the display of hidden and system files on your flash drive. Check the USB flash drive with antivirus software and remove if found. If, after checking for viruses, the size of the flash drive has not changed, format it by first saving the data to the computer's hard drive or other storage medium.
Step 2
If all the folders on your flash drive have been replaced by a virus with shortcuts, and the ratio of free to occupied space has not changed, do not rush to format it. At the same time, the virus creates a directory in the name of which it writes invalid characters. You can make sure that the information from the flash drive has not disappeared anywhere using the command line. Enter "g: / / x" in it, where g is the USB flash drive itself, and x is the key to show all files. You will see a hidden folder, for example, named e2e2 ~ 1.
Step 3
When you know the name of the folder, you can access it directly from the file manager. Using the command line, rename this name, which contains an invalid ~ character, to something else, for example, 111. Another way to deal with this virus can be to create a bat-file containing the line "attrib -s -h -r -a / s / d" and executing it from a flash drive. In addition, a USB flash drive can be packed with an archiver, and after opening the archive, extract all the necessary folders.
Step 4
Determine the real size of the flash drive using the h2testw utility. To do this, connect it to your computer and make sure there are no files on it. Run the h2testw utility, press the "Select" button, select data writing to all free sectors as the preferred test method. To test, click the "Write + Verify" button.