Shortcut Virus is a very common virus that converts files and folders into shortcuts mostly in flash drives/pen drives/SD cards or similar ones. One of the ways on how to remove shortcut virus from USB flash drive is through Windows Command Prompt or CMD.
A shortcut virus spreads very fast. First, it’s going to hide your files and create a shortcut. Since you have no other way to access your important files, you have to click the shortcut file. After you click that shortcut, it replicates and hides more of your files and folders. In the later part of the shortcut virus infection, accessing your files is not possible anymore, corrupting them or the worst case scenario, stealing your personal information.
The USB flash drive or pen drive might be infected with shortcut virus when you used it to transfer data from other infected computer. It is also possible that its from the infected file you have downloaded online and copied into your USB flash drive/SD card.
The best solution for this is to format your USB flash drive. And no, you don’t want to do that since it contains your important files, projects, presentations, thesis, accounting reports, etc. which you have spent plenty of hours to finish. In this case, you just have to remove the shortcut virus in your USB flash drive using the cmd or command prompt.
You might probably think this is something “techy” but don’t worry. It’s really easy. This is not just to help you with your shortcut virus problem, I’m teaching you to be a hero for your classmate/workmate who are dealing with this problem in critical situations.
Steps on How to Remove Shortcut Virus from USB Flash Drive Using CMD
1. Connect the USB Flash Drive to a computer.
When you connect your infected USB flash drive to a computer, don’t open it. This is the mistake of most users. When you open it, a big possibility that the computer will be infected by the shortcut virus, too.
2. Open the Windows Command Prompt or CMD.
Windows Command Prompt is a command line interpreter application used to perform advance administrative functions of Windows operating system. To open command prompt, click the Start Button + R. Then, type cmd and press Enter.
3. Determine the USB Flash Drive letter.
Every drive connected to a computer is assigned a single alphabetic letter or commonly referred to as drive letter. These drives can be viewed in the Computer Folder. To determine the USB Flash Drive letter, go to Start and click Computer (or My Computer). You can probably see Local Disk (C:), Local Disk (D:) or DVD RW Drive (E:) or more. Check the drive letter of your USB Flash Drive. Example: F:, G:, H:, …
4. Enter the command to delete shortcuts.
Since the Shortcut Virus created a lot of shortcut, you may want to delete them all first. This will not delete your original files though, just the shortcuts. Assuming the drive letter of your USB Flash Drive is letter F. In the command prompt or cmd, type F: then press Enter. The next commands will be executed solely in the USB flash drive. To delete all the shortcuts, type del *.lnk then press Enter.
A brief explanation with the command, the del means delete. The *.lnk means all link files(shortcuts). The computer interprets it as “delete all link files” then when you click Enter, it executes the command.
5. Enter the command to change the file attributes back to original.
To make the attributes of the original files back to normal, type this code attrib -r -s -h /s /d *.* then press Enter. This command line removes the read-only, system and hidden attributes assigned to files. This may take few seconds or minutes but wait till the cursor start blinking again. That’s it! Check your files.
If you want to dig deeper with the commands:
- attrib : allows users to change the attribute of the files.
- – : sets an attribute.
- + : clears an attribute.
- r : read-only file attribute.
- s : system file attribute.
- h : hidden file attribute.
- s/ : Applies attrib and any command-line options to matching files in the current directory and all of its subdirectories.
- d/ : Applies attrib and any command-line options to directories.
If you want to learn more about these commands, visit Microsoft command-line reference.
That’s how to how to remove shortcut virus from USB Flash Drive using CMD or command prompt. I hope it worked in your end. If you have some questions or additional useful information, do let us know via comment below.