I need to send file (text file) to com1 (RS-232) port, how i can do it ?
thank's in advance
First answer:
type file.txt > com1
Edit after spotting the C#
tag 8-) I think this will work:
using System.IO;
...
File.Copy(@"c:\file.txt", "com1");
but I can't properly test it as I have nothing I can plug into my COM1 port. 8-) It appears to work, in that it blocks rather than throwing an exception.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With