How to ftp from one computer to another

I just got an assignment to develop an application that allows the user to scan a document and ftp it to the IP of another computer on the network.  I’ve done a little research on the net, but I don’t know where to start.  Do I need third party ftp software on both machines or can I connect through the OS?  I believe both machines have XP.  Do I need any info other than the IP address of the machine?

The app will require a user interface.   I will be developing this in vb.net.

Any advice to get me started is appreciated.
Delta7428Asked:
Who is Participating?
 
Ron MalmsteadConnect With a Mentor Information Services ManagerCommented:
0
 
Brian GeeConnect With a Mentor Commented:
Since the copying over of a document from one point on the network to another using simple command line commands works (whether from the command line or in a batch file), why not program this to have the scan copied from local directory to the remote directory (designated by IP, as you have noted)? No need to get FTP involved, unless there is an objective here for which it is needed that is not being mentioned here...
0
 
Carlos VillegasFull Stack .NET DeveloperCommented:
Hello, if you remote pc have a shared folder you can use this methods to copy or move the files from one computer to other:

System.IO.File.Copy(source, destination)

Open in new window

Or
System.IO.File.Move(source, destination)

Open in new window


Just explore the System.IO.File class.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
lluddenConnect With a Mentor Commented:
There is a oretty good little library on The Code Project for ftp with dotnet 2.0.

http://www.codeproject.com/KB/IP/FtpClient.aspx

0
 
CodeCruiserConnect With a Mentor Commented:
>I just got an assignment
So I am assuming copying using directories is not an option. In order to accept a file over FTP, the target computer needs to be running the FTP server service.
0
 
Delta7428Author Commented:
yobri, can you give me an example command line string to do this?

yv989c, thanks for your suggestion.  I am checking into this to see if I can just copy it to a network or shared folder.  Though since it is requested for specifically an ftp project for some reason, I am guess that is not feasible since I have done many projects that drop files in various locations for different applications to employ.

I'll take a look at the links posted.  Thanks.
0
 
AlexPaceConnect With a Mentor Commented:
CodeCruiser is correct.  For FTP you need both a client and a server.  If FTP is a requirement you might consider using a non-standard port so you don't block other FTP applications and also building both the client and the server into your software.  

You should use supported libraries for the client and server rather than trying to implement them yourself.  The money you spend will be worth it for the time you saved. Here are links to a client and server object from the same company:
http://www.weonlydo.com/FtpDLX/ftp-sftp-ssl-component.asp
http://www.weonlydo.com/FTPServer/ftp-sftp-ssl-server.asp

They have documentation and samples that will help you get it done.

0
 
Delta7428Author Commented:
Thanks Alex.

I still have questions to be answered from the end user mgr, but I did find out that the document to be ftp'd is going to one of our weaving looms and that ftp is supposedly the only way it will accept it.

I'm also told that the ftp is currently being done "manually" (not sure what they mean by that) and that there used to be a batch process in place that doesn't work  now and/or can't be used anymore for whatever reason.

So ... I'm waiting to get a chance to meet with the mfgr manager and check out the existing process, server, etc. before I can break any ground here.
0
 
CodeCruiserConnect With a Mentor Commented:
So the weaving looms are probably already running the FTP server. All you have to try is post the file via FTP.
0
 
AlexPaceConnect With a Mentor Commented:
If the process is too complicated for a batch file you might consider using a fully scriptable FTP clinet like Robo-FTP instead of writing new software.  Robo-FTP allows you to write a script with much better error handling than a plain batch file.  You can set it up to "watch" a folder and then automatically upload any files that appear and have it automatically retry on failure and even email you on repeated failures.  It isn't as flexible as a "roll-your-own" solution but it is often a lot faster to deploy.
0
 
Delta7428Author Commented:
Thanks CC.  That's my guess too.  I guess that would have to be the case?

And thanks AP.  I'll definitely look into possibility and will probably come back with questions.  I'm still waiting the meet with the person in charge so I can get going here.  

Ahhh .... the same old story ... You know the type --- not enough time in the day to meet with the person who can save them from digging themselves deeper in that enormous pit doing things the most inefficient way possible!  :O
0
 
CodeCruiserCommented:
Yeah usual business people :-)
0
 
Delta7428Author Commented:
normal ... usual ... business people.  Evolution will weed them all out. Then what would be called weird among a population of eggheads?  Sleep? Ha
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.