Signs of a USB Flash Drive Infected With a Virus
“Infected USB flash drive, all files seemingly deleted, the only thing inside is a shortcut file. USB drive properties say 909 MB of space is used, and showing hidden folders and files turns up nothing. What kind of a virus is this? How do I remove it? Is there a way to recover the lost files? Also, is that spare computer I used infected now?”reddit.com
As the most commonly used external file storage device, USB flash drives are prone to various issues, and USB virus infection is one of them. Aside from the issue of files or folders turning into shortcuts mentioned above, there are several other signs that indicate a USB drive has been infected by a virus. Some common symptoms include:
- The USB drive appears to be occupying space, but the files are not visible.
- There are unknown files or autorun.inf on the USB disk.
- An unexpected pop-up window or high CPU usage occurs when the USB drive is connected to your computer.
Faced with lost or invisible files on the virus-infected USB drive, how to recover files and remove viruses? Refer to the following instructions.
How to Recover Virus Infected Files From USB Flash Drive
Disable AutoPlay Before Doing the Following Things
To prevent malware or viruses from automatically running, you can disable AutoPlay before plugging the USB into your computer. This can prevent external devices from automatically opening files, installing programs, modifying system settings, etc. without your permission.
Open Settings and select Devices. Go to the AutoPlay tab, and then switch the button under Use AutoPlay for all media and devices to Off.

Part 1. Recover Hidden Files
As mentioned before, some viruses do not really delete or damage the original files but hide them so that you cannot see them. In this case, you only need to take measures to cancel the hidden attribute of the files to make your original files visible. Here you can see how to recover virus infected files using CMD.
Step 1. Type cmd in the search box on the taskbar, and then click Run as administrator under Command Prompt.
Step 2. If you receive the User Account Control window, select Yes to continue.
Step 3. Type this command line and press Enter: attrib -h -r -s /s /d X:\*.*. Note that you need to replace X: with the actual drive letter of your USB drive. For example, here I run the attrib -h -r -s /s /d J:\*.* command line to show hidden files on the J drive.

Once this command line is executed, you can open your USB drive and check if the files are there.
This is all about how to recover hidden files from pen drive after virus infection.
Part 2. Restore Deleted Files
If the files are actually deleted rather than hidden, check if you have a backup. If so, you can restore your files from there. If not, you need to use free data recovery software to recover your files from the USB drive.
MiniTool Power Data Recovery is a powerful and versatile data recovery tool designed to recover lost files from various file storage devices, including USB flash drives. It excels not only in cases where data is lost due to virus infection, but also in cases where files are deleted due to accidental deletion, file system corruption, or even system crashes. It can efficiently scan USB drives or other disks and recover files without causing any secondary damage to data and disks.
This comprehensive data restore tool supports multiple file types and file systems. The file types it supports include documents, pictures, videos, audio, and more. Its fully compatible file systems include FAT12, FAT16, FAT32, exFAT, NTFS, etc.
If this is the first time you use it, you can download the free edition, which allows you to recover 1 GB of files for free.
MiniTool Power Data Recovery FreeClick to Download100%Clean & Safe
Follow the steps below to recover virus infected files from USB flash drive.
Step 1. Make sure the USB drive is well-connected to your computer, and then launch MiniTool Power Data Recovery to enter its main interface.
Step 2. On its home page, you are under the Logical Drives section by default. What you should do is find the target USB drive according to the USB icon, partition size, and other drive information, and then click the Scan button to start scanning.
Moreover, if there are multiple partitions on your USB drive and you do not want to scan them one by one, you can go to the Devices section to scan the whole USB disk.

Wait for the scanning to end automatically to ensure that you can get the best scanning outcome.
Step 3. Once the scan is complete, MiniTool Power Data Recovery displays the found files by default under Path according to the file directory, which is good for you to find the files that still maintain their original structure. But if you have difficulty navigating to the required files from here, you can use the following features provided by this software to find the needed files faster.
The Type category list allows you to filter the scanning results by file type, so that you can narrow down the file results to specific categories such as documents, images, videos, etc. This feature is especially useful if you are looking for a specific file type and want to save time sifting through irrelevant results.

In addition, the Filter function allows you to apply further refinements based on properties including file type, file size, file modification date, and file category. More specific filter conditions can help you narrow down the scope of files more accurately.

The Search function also plays a vital role, which allows you to enter specific keywords of the file name to find exactly what you are looking for. If there are a large number of recovered files and you need to find a specific file quickly, you can use this feature.

In addition, this software also provides a Preview feature. With it, you can quickly check the contents of documents, images, videos, and other file types directly inside the software. This can help you confirm that the file is intact before you decide to recover it to your computer.
Step 4. Finally, click the Save button in the lower right corner and choose a new location separate from the original USB drive to save the files you ticked.
How to Remove Virus From USB Without Deleting Files
Now that you know how to recover virus infected files from USB flash drive, the next step is to remove the viruses to prevent secondary file loss or even disk corruption.
Use Windows Defender
Windows Defender is a powerful antivirus tool built into Windows that can effectively scan USB drives for viruses and malware. When it detects any malicious files, it will quarantine or delete them to prevent further infection.
- Press the Windows + I key combination to open Settings.
- Navigate to Update & Security > Windows Security > Virus & threat protection > Scan options. Then you can choose to perform a quick scan, full scan, custom scan, or an offline scan. After that, click Scan now.

If Windows Defender does not scan the USB drive when you insert it into your computer, you may need to manually change the registry and group policies to enable Windows Defender to scan the USB drive automatically.
Format the USB Drive
Most viruses and malware rely on certain files or system settings to survive. Therefore, you can also remove these viruses including hidden or hard-to-detect malicious codes by formatting the USB drive. It should be noted that formatting will clear all files in the USB drive, so make sure you have transferred all existing files before formatting the disk to prevent data loss.
You can format the USB flash drive from File Explorer:
- In the This PC section in File Explorer, right-click the USB drive and choose Format.
- Next, choose a file system, type a volume label, tick Quick Format, and click Start.
Alternatively, you can use the best fee partition management software, MiniTool Partition Wizard, to format the USB drive. In addition to disk formatting, this comprehensive tool also supports partition resizing, disk copy, OS migration, GPT to MBR conversion, and so on.
MiniTool Partition Wizard FreeClick to Download100%Clean & Safe
- After downloading and installing MiniTool Partition Wizard on your computer, launch it to enter its home page. Then, select the USB drive partition, and click Format Partition from the left menu bar.
- Set the partition label, file system, and cluster size for the selected partition and click OK.
- Preview the formatted partition, and then click Apply in the lower left corner.
After formatting the USB drive, it is recommended to run a virus scan again by using Windows Defender.
Take Precautionary Measures to Protect Against USB Viruses
As you can see, once a USB drive is infected with a virus, it will pose a huge security risk. Taking precautionary measures to protect your USB drives from malware is essential to safeguard your data and prevent potential virus infections on your computer.
Common Types of USB Virus Infections
Here are some common types of USB viruses:
- Shortcut virus: This is the most common virus on USB drives. It converts all files or folders on the USB flash drive into shortcuts, and the original items will be hidden or deleted. If you click on these shortcuts, the virus program will run instead of opening the original file.
- Autorun virus: When the USB disk is plugged into the computer, the virus will automatically run through the autorun.inf file in the drive, thereby spreading the virus.
- Trojan virus: It usually disguises itself as a legitimate program or file to trick you into running it. In addition, it may perform malicious operations without your knowledge.
- Worm virus: It is a type of malware that can replicate itself and spread through the network or external devices.
Helpful Tips to Prevent USB Drives From Virus Infection
Generally, different types of USB viruses require different preventive measures. It is recommended that you perform the preventive actions as comprehensively as possible to maximize virus protection.
- Disable the AutoPlay feature on your computer to prevent external disks from running automatically when connected.
- Use Windows Defender or other antivirus software to scan your USB drive for viruses. Also, it is suggested to turn on the real-time protection to detect and block potential threats timely.
- Do not click on random shortcut files on the USB drive if they are not created by yourself.
- Enable the Show Hidden Files feature to check whether there are suspicious files on the disk.
- Do not click on pop-up ads or installation prompts on USB drives.
- Back up USB drive files on a regular basis. If your files are lost due to virus infection or some other reason, you can easily restore them from the backup. If you prefer using a professional data backup tool for USB drive backup, MiniTool ShadowMaker is worth trying. It is capable of backing up files, folders, partitions, and disks.
MiniTool ShadowMaker TrialClick to Download100%Clean & Safe
Bottom Line
To sum up, this guide introduces how to recover virus infected files from USB flash drive and how to remove the virus. Furthermore, it also outlines information about common USB drive virus types and precautionary measures. I hope the information above meets your needs.
If any issues occur during your use of MiniTool products, please do not hesitate to send an email to the support team at [email protected]. You will get detailed assistance as soon as possible.
User Comments :