Write in output file



Hi, 
I'm not able to write an output file with the result of my formula.

For Exemple I  have:

for i:0 step 1 thru 10 do ( if i>4 then print("factors of ",i," are 
",factor(i)));


And I want to write the result in an  output file: 

I think :

f :  ?open (?"c:\temp\fileout.txt")$
for i:0 step 1 thru 10 do ( if i>4 then print("factors of ",i," are 
",factor(i)));
?close (?f);

Can you help me, plese ?