VB communication.

I am trying to write a VB5 proc for a win95 machine to connect
to another win95 machine with a modem and transfer a text file
or open a ftp session to put a text file to that machine. I am
using MSComm control to connect to the other machine. But
can I ftp a file to another w95 machine without a ftp server?
This process has to run automated every hour. I
will appreciate any help on this. Thanx
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Why use FTP when you've established a connection successfully? Just copy the file over the wire and save it on the other end.

wchy65Author Commented:
Edited text of question.
The FTP protocol is supported using the Inet control, not the MSCOMM control.  MSCOMM is used for async communications.

If you're going to use this control to send a file, you need to have a program on the receiving system that will accept the async connection.  You will also have to build your own "protocol" for sending and receiving the file...

For example:

After you make the connection between the two systems, the sending side sends:

   Mscomm1.Output chr$(255)+chr$(255)+"FILENAME"+CHR$(0)+"FILESIZE"+chr$(0)

The receiving side gets this data using the MScomm1.Input call, parses it and figures out that it is about to receive a file called "FILENAME" and it has a file size of "FILESIZE"...

The next characters received up to however big "FILESIZE" is, should be read off the comm port and written to a file...

Get the picture?


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.