Problems with syntax using Vista findstr command

Status
Not open for further replies.
findstr /C:”Cannot repair member file” C:\windows\logs\cbs\cbs.log >sfcdetails.txt
yields:

FINDSTR: Cannot open repair
FINDSTR: Cannot open member
FINDSTR: Cannot open file"

PLEASE HELP--AM TOO DUMB TO KNOW WHAT IS SYNTAXED INCORRECTLY
 
Try the system file checker - go to start > run and type in sfc /scannow. Note the space between the c and the /...
 
findstr /C:”Cannot repair member file” C:\windows\logs\cbs\cbs.log >sfcdetails.txt
yields:

FINDSTR: Cannot open repair
FINDSTR: Cannot open member
FINDSTR: Cannot open file"

PLEASE HELP--AM TOO DUMB TO KNOW WHAT IS SYNTAXED INCORRECTLY

Either
1) Put quotes around the full file path
findstr /C:”Cannot repair member file” "C:\windows\logs\cbs\cbs.log" >sfcdetails.txt

or
2) Use a system variable in the file path
findstr /C:”Cannot repair member file” %windir%\logs\cbs\cbs.log >sfcdetails.txt
 
Status
Not open for further replies.
Back