|Because >> %f% is interpreted as a redirector for the SET command NOT part of the string.|
To write a redirector inside a variable you have to "escape" it by prefixing with a caret symbol (^), i.e.
set line= %user% %pwd% ^>^> %%f%%
but this blows up other troubles when echoing the variable.
Sorry, handling special symbols in batch is a hard job and must be planned carefully as there is no general rule.
You are trying too hard for your level of knowledge.