Windows 7 Does Sfc /scannow append new entries to CBS.Log?

pstein

Extraordinary Member
It seems to me that the well known command

sfc /scannow .....

appends all logmessages to a possibly already existing CBS.LOG file rather than create a new logfile.

Is this correct?

So if I want to have a fresh logfile just with the results from the last sfc run I have to manually delete the exiting CBS.LOG file.

Can I somehow tell sfc to create a new logfile (e.g. CBS20170813.log) instead of appending it to the exisitng one?

Peter
 
Yes it appends (look at the time & date stamps in the file). I do not see any switch that allows you to specify a log file location, however since there are time stamps within the file itself, I'm not sure exactly what you are trying to accomplish?
 
I believe Josephur is correct. The SFC command log file function is built on the same model used by Windows for generating Crash Dumps (mini-dumps), and most of the Event Viewer log files such as System log, Application log, and Security log also work the same way. Microsoft wants to give you results of the logs, but doesn't let you manipulate them (unless you use a non-Microsoft 3rd party app), nor the generation behavior such as how to produce the log, or where it can be stored on your C: drive, or other drive location. They are not overly concerned about filling up your hard drive with these, as computers used by power-users and businesses rarely cause the free space of almost any hard drive to be consumed by these rather large files. But, since they are only text files, thousands of entries in each log only take up a few KB, or MB. Unless, you are running your hard drive at 98% or 99% used space of capacity this would almost never happen. At least on a well-maintained computer. If you are running only 1%-2% free space on any windows computer of any version; it would have crashed usually long before you can try to fix a problem from log files sucking up any remaining space you might have.:headache:

You might google the forums and see if there are some freeware utilities out there that can help you. Like I said I think I've run across a few; don't remember their names. Also, this is the sort of thing that Microsoft encourages, which is having programmers find a niche for some not-often used tool not included with Windows to provide additional functionality, just because they wanted it for themselves and decided to share it, and in some cases expand on it and make some money.:fdance:

<<BIGBEARJEDI>>
 
Back
Top