First answer:
type file.txt > com1
Modify after defining tag C#8). I think this will work:
using System.IO;
...
File.Copy(@"c:\file.txt", "com1");
but I can’t test it correctly, because I can’t connect anything to my COM1 port. 8-) It seems to work as it blocks, rather than throwing an exception.
source
share