Redirecting root output

Dear,
I found this post: Redirecting scan output to a text file?
[1] works, but [2] not. Is [2] possible or did I missed something?
Regards

[2]
root [4] t->Scan(“pt_1”) ; >scan.log
ROOT_prompt_4:1:19: error: expected expression
t->Scan(“pt_1”) ; >scan.log
^
ROOT_prompt_4:1:20: error: use of undeclared identifier 'scan’
t->Scan(“pt_1”) ; >scan.log

[1]
root [10] ((TTreePlayer*)(t->GetPlayer()))->SetScanRedirect(true);
root [11] ((TTreePlayer*)(t->GetPlayer()))->SetScanFileName(“output.txt”);
root [12] t->Scan(“pt_1”)
File <output.txt> created
(Long64_t) 26002