If you connect a USB drive (USB drive) or SD card (memory card with Secure Digital format) and find that your files are missing and replaced with shortcuts, your USB drive is most likely infected with a virus. Fortunately, your data is actually still on the USB drive, but hidden. You can restore data and clean the infection from your drive and computer with a few free commands and tools.
Step
Part 1 of 2: Repairing the Drive
Step 1. Connect the infected USB drive to your computer
When a file on your USB drive turns into a shortcut, it's actually still there, but hidden. This process will make the file reappear.
Do not run the shortcut on the USB drive as it can cause the infection to spread
Step 2. Verify the drive letter of the USB drive
You must know the drive letter of the USB drive or memory card that has been infected by a virus. The quickest way to find out is to open a "Computer"/"This PC" window. The drive letter of the USB drive will be listed next to the drive label.
- Press Win+E to open windows on all versions of Windows.
- Click the folder button on the "taskbar" (taskbar) to open a window.
- Click "Computer" on the "Start" menu if you are using Windows 7 or Vista.
Step 3. Open “Command Prompt” (command prompt window)
You will perform the repair using a few commands on the “Command Prompt”. How to open “Command Prompt” varies depending on the version of Windows you are using:
- All versions - Press Win+R and type "cmd" to launch “Command Prompt”.
- Windows 8 and later – Right-click on the Windows key and select "Command Prompt".
- Windows 7 and earlier – Open the “Start” menu and select “Command Prompt.”
Step 4. Type
attrib -h -r -s /s /d X:\*.* and press Enter.
Replace X with the letter of your USB drive. For example, if your USB drive letter is E, type attrib -h -r -s /s /d E:\*.* and press Enter.
- This will bring up the file, and remove all “read-only” attributes and shortcuts.
- This method will take some time to complete depending on how much data is on the USB drive.
Step 5. Open the unnamed folder that appears on your USB drive
This folder will contain all the data previously hidden by the infection.
Step 6. Copy all the recovered data to a safe location on your computer
This location is only temporary until you finish cleaning the drive. You can create a folder on the desktop to temporarily store files. Drag the files from the USB drive to the folder you want.
To copy large data takes a long time
Step 7. Right-click on your drive in "Computer"/"This PC" and select "Format
" This will open a "format" window.
The "format" process (the process of restoring normal memory function and capacity) will clean the drive completely, so make sure you've copied all the data
Step 8. Uncheck "Quick Format" and click "Start"
" Unchecking next to "Quick Format" will scan and clean the USB drive for infections. The "format" process will take a while.
Part 2 of 2: Scanning a Computer
Step 1. Download and run UsbFix
This is a free program that can scan and clean common USB infections. You can download this program from fosshub.com/UsbFix.html.
- Click the "Research" button after running UsbFix. UsbFix will start scanning your USB drive.
- Click the "Clean" button once the scan is complete. This will fix all infections that UsbFix finds.
Step 2. Make sure your anti-virus program is up to date
If a drive becomes infected while it is connected to your computer, it is very likely that your computer will also become infected. The first step to fighting the infection is to make sure your computer is running the latest anti-virus program. You can check for updates by right-clicking on the antivirus icon and selecting "Check for Updates."
- Immediately install if your computer is not installed anti-virus. There are many well-known anti-virus programs such as Avast!, Bit Defender, and Windows Defender.
- If the USB drive becomes infected after connecting to another computer, you must inform the owner of that computer that yours is infected.
Step 3. Run the scanner with the anti-virus program you are using
After updating or installing an anti-virus program, run a scan on your computer. This is very important, especially if you rarely run scans.
Step 4. Download and install Malwarebytes Anti-Malware
The free version of this program can find and clean common infections. You can download this program for free from malwarebytes.org.
Choose "free license" during the installation process
Step 5. Run Anti-Malware and install any available updates
You will be asked to check for updates when Anti-Malware starts up for the first time. Download and install all available updates before starting the scan.
Step 6. Start a scan with Anti-Malware
The scan will take about 20-30 minutes.
Step 7. Click "Quarantine All" after the scan is complete
This will clean up any infected files found during the scan.