Results 1 to 5 of 5

Thread: [2005]How to copy a file to a COM port in VB?

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2007
    Posts
    17

    [2005]How to copy a file to a COM port in VB?

    Hi Guys,

    I am a novice Developer, and have only just completed a pretty basic course in VB.net.

    I am trying to do a straightforward file copy.

    I want to take a file, eg c:\test.txt
    and copy it straight to a com port eg COM1

    This works well in DOS and I suppose I can do it using Shell if absolutely necessary, but I would like to do it in VB.

    I have managed to get the file to copy perfectly, using

    FileCopy ("c:\test.txt", "COM1")

    I am monitoring my COM port using Free Serial Port Monitor http://www.serial-port-monitor.com/index.html, and the data is going through the same as if you do a DOS copy;
    (eg: copy c:\test.txt com1:)

    But VB crashing out with an error when it has sent the file, as per the screen shot below.

    Does anyone have any ideas ?
    Attached Images Attached Images  
    Last edited by danweb; Jun 15th, 2007 at 07:14 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width