To remove virus that automatically delete files, use the following CMD. After this, use anti-virus software to remove the virus completely. Step 1. Right-click on Start and select Command Prompt (Admin). Step 2. Type D: and hit Enter. (Replace D: with the drive letter where the virus files exist.) Step 3. Type attrib and hit Enter. Step 4. Type attrib -r -a -s -h *.* and hit Enter. Step 5. Type: del autorun.inf and hit Enter.