What about
"copy con filename"
then press F6 and enter to end it?