Hello everyone!
My computer is XP, with disks C, D, E, F, G, H, etc. Now, because the computer was infected with a virus, I formatted the C drive and reinstalled the system, but there are _desktop.ini files (this is a virus) in various subdirectories and subfolders of other disks. The files themselves have the attributes "Hidden, Read-only, System", and they cannot be directly deleted. I can't delete them one by one in the command line mode, so I ask how to write a batch script to kill all this _desktop.ini on the hard drive. (What I am asking for here is the syntax of the batch script. The special virus-killing tool software is not in the discussion. Also, please don't delete the post, because I have searched relevant posts and can't completely solve this problem, so I posted a new post to ask for advice, please forgive me!)
@echo off
for %%i ('_desktop.ini') --------- do attrib -r -a -h -s _desktop.ini & del _desktop.ini
pause
exit
The idea is to first find all _desktop.ini files in the subdirectories of each partition on the hard drive, and after finding them, use ATTRIB to change their attributes, and then use DEL to delete this file, so that there will be no more of this virus on the hard drive. Please give me your advice---------Thank you!
It is worth noting that there must be Chinese paths or paths with spaces in the path. I am waiting for your advice---------
Also, I want to ask, if the system is WIN2000, will this batch script be applicable?
[ Last edited by flying008 on 2006-9-20 at 20:27 ]
My computer is XP, with disks C, D, E, F, G, H, etc. Now, because the computer was infected with a virus, I formatted the C drive and reinstalled the system, but there are _desktop.ini files (this is a virus) in various subdirectories and subfolders of other disks. The files themselves have the attributes "Hidden, Read-only, System", and they cannot be directly deleted. I can't delete them one by one in the command line mode, so I ask how to write a batch script to kill all this _desktop.ini on the hard drive. (What I am asking for here is the syntax of the batch script. The special virus-killing tool software is not in the discussion. Also, please don't delete the post, because I have searched relevant posts and can't completely solve this problem, so I posted a new post to ask for advice, please forgive me!)
@echo off
for %%i ('_desktop.ini') --------- do attrib -r -a -h -s _desktop.ini & del _desktop.ini
pause
exit
The idea is to first find all _desktop.ini files in the subdirectories of each partition on the hard drive, and after finding them, use ATTRIB to change their attributes, and then use DEL to delete this file, so that there will be no more of this virus on the hard drive. Please give me your advice---------Thank you!
It is worth noting that there must be Chinese paths or paths with spaces in the path. I am waiting for your advice---------
Also, I want to ask, if the system is WIN2000, will this batch script be applicable?
[ Last edited by flying008 on 2006-9-20 at 20:27 ]

