1.

Solve : NEED HELP: a batch file that analyze a text log.?

Answer»

hi guys. im new here. and new to making a batch file.
maybe you guys could help me. i'd like to make a batch file that will analyze a log (e.g. kaspersky antivirus log) and remove the items found on that log. this includes files on a directory or on the registry.
the logs could be drag and drop in the window or copy the text in the log to the window of the batch file.
i dont KNOW where to START since im new in batch file making.
and if you could give me a list of all the commands to start with.
hoping for a response from you guys..
thanksSo you want to delete the log?You really need Logparser :
http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&displaylang=enSo you want to delete the log?
no sir, i'd like to delete file that are found in the log. example of a log by mcafee command line scanner:

c:\windows\system32\asdasjeld.dll
c:\info.exe
c:\windows\sadhadjafs.dll

those are virus that needs to be deleted/remove manually. and so, if the scanner found a hundreds of those, it would took a lot of time to delete them. so if only we have that batch file that would analyze that log and remove those files in the logs in one press of a key after draging that log in the window where that batch file is running (that batch file will ask to drop the log in the window), that would be great.

i have seen this batch file a long time ago. but i cant find it or similar to it. that batch file analyze a kaspersky online scanner log.I suspect the log contains more information than shown, in which case you'd need to filter out info not needed.

Code: [Select]@echo off
for /f "tokens=* delims=" %%i in (mcafee.log) do (
echo %%i
)

The code is written to print the files to be deleted. When you are completely SATISFIED, change echo %%i to del %%i

Extreme caution is ADVISED. Mass deletions can make restarting your PC a CHALLENGE.



Discussion

No Comment Found