You can remove virus from your infected Drive or USB using CMD. Most virus create shortcut or super hide all data’s or change index path of data in drive. follow below steps to remove viruses from your computer drive or Flash Drive.
Step 1. In the search bar, type CMD then right-click on “Command Prompt” and choose “Run as an administrator”.
Step 2. Type X: and press “Enter”. ( ‘X’ is infected drive letter )
Step 3. Type attrib -s -h -r -a /s /d *.* . and hit “Enter”.
Step 4. Now type del autorun.inf and hit Enter
Command | Explanation |
---|---|
attrib | Set attribute |
s | change file type as system file |
h | Hidden attribute |
r | Read permission control |
a | Archive a file or directory |
/s | search throughout including sub folder |
/d | include any process folder |
You can make a Batch file to automate the process. but you need to open batch file as notepad and change drive path accordingly.
@echo off X: attrib -s -h -r -a /s /d *.* del autorun.inf exit