stalxed Posted December 11, 2014 Share Posted December 11, 2014 I use this command: "C:\Program Files\CCleaner\CCleaner.exe" /clean "C:\ccleaner.txt" How can I programmatically analyze this log? Example of log: SummaryWindows Explorer - Recent Documents 2 KB 2 files System - Windows Log Files 1 KB 1 files Firefox - Internet Cache Skipped Firefox - Internet History Skipped Firefox - Session 1 KB 1 files ------------------------------------------------------------------------------------------C:\Documents and Settings\Administrator\Recent\ccleaner.txt.lnk 1 KBC:\Documents and Settings\Administrator\Recent\logs.lnk 1 KBC:\WINDOWS\system32\wbem\Logs\wbemcore.log 1 KBFirefox Internet Cache cleaning was skipped. Firefox Internet History cleaning was skipped. C:\Documents and Settings\Administrator\Application Data\Mozilla\Firefox\Profiles\wxgns381.default\sessionstore.js 1 KB How we can see, there is an error. Some files is missing. I need programmatically to analyze the file, and if any skipped files or other troubles, then to find out. I have developed the following algorithm: The first line must be the word Summary. If it is not passed in the negative analysis. Check whether there is a separator: ------------------------------------------------------------------------------------------ If it is not passed in the negative analysis. Performs an analysis of each line between the summary and the separator. As follows: split a string by the symbol tab, if the last element of the word Skipped, then the negative analysis. If the analysis does not work is not one of the the negative conditions of the analysis, then the analysis went positive. Questions: What do you think of this algorithm for analysis of the log file? Maybe I'm missing something? Maybe except for skipped files there exceptions? Link to comment Share on other sites More sharing options...
Moderators Andavari Posted December 12, 2014 Moderators Share Posted December 12, 2014 If you want to see a better report the good old "classic" detailed way it used to be, go into and enable: Options -> Advanced: Show initial reports in detailed view Link to comment Share on other sites More sharing options...
Moderators mta Posted December 12, 2014 Moderators Share Posted December 12, 2014 Firefox was probably skipped because it was not closed. I'd probably start with a Batch file and the FIND command looking for skipped. But what is it you are trying to achieve, I mean, the effort to run some program against the log file looking for errors seems no easier than simply opening said log file and doing that yourself. Backup now & backup often.It's your digital life - protect it with a backup.Three things are certain; Birth, Death and loss of data. You control the last. Link to comment Share on other sites More sharing options...
stalxed Posted December 12, 2014 Author Share Posted December 12, 2014 It is necessary to analyze in automatic mode. Now I see two possible scenarios: 1) Successful files cleaned System - Windows Log Files 1 KB 1 files 2) Failed to clear Firefox - Internet Cache Skipped I see only 2 scenarios. Are there others? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now