I want to run SFC command in a cmd file. At the ende of the check i would like to verify whether SFC has found errors (that an error message can be displayed) or not. Unfortunately errorlevel seems not to be working with sfc - it always shows 0 in my experience, no matter if it found corrupted files or not.
Some ideas how to solve this?
Update: To be more precise what i want is this. The cmd starts some backupjobs etc. then starts the sfc/scannow. In case sfc found corrupted files and repaired them i want that some alert can be triggered and the cmd comes to a stopp, so that in the next morning i can see that something was fishy (I know that /scannow should already have fixed everything - but i want to have a look at this).Usually for this kind of "Errorhandling" i read out the %errorlevel% to find out if a command produced an error. But this is not possible with sfc since - in my experience - it always shows 0 for errorlevel no matter what. I'm looking now for a workaround. End of Update.