Solved

Simple Stumper - File Transfer from PC to Server on Web

Posted on 2002-03-15
5
149 Views
Last Modified: 2010-05-02
This seems like it should be very simple, but I don't know how to do it.

I need to create a program that can run on a PC.  The PC is connected to the internet.  The program needs to grab a file off the PC (path/file name can be hard coded into the program), and FTP the file to a particular ftp server (again, the ftp server address can be hard coded).

The key requirement is that the end user needs to have this process appear totally seamless.  They click, the file gets transferred, and the user is returned to where they were so they can continue about their business.

How can I do this?
0
Comment
Question by:Danimal
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 18

Expert Comment

by:mdougan
ID: 6868730
It can be fairly simple of you go to the Project|Components menu and select the Microsoft Internet Transfer Control.

Put one on your form somewhere, set the protocol to FTP, set the URL and I think that there might even be a property for remote directory, if the IP address is not enough.

You might also have to fill in a user id and/or password in the control's properties.

Then, in your code, under the button, you'd have something like:

   Inet1.Execute "WWW.MYSITE.COM", _
   "SEND C:\MyDocuments\Send.txt SentDocs\Sent.txt"

Where SentDocs is a remote subdirectory on the website and sent.txt is the name of the file after it is transfered.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6868731
0
 
LVL 18

Accepted Solution

by:
bobbit31 earned 20 total points
ID: 6868779
put an internet transfer control on form and do this:

Inet1.URL = "ftp://server"
Inet1.UserName = "<userName>"
Inet1.Password = "<password>"

'' note i don't know if this supports embedded spaces in file name
Inet1.Execute , "PUT fileSrc fileDest"

While Inet1.StillExecuting
    DoEvents
Wend

MsgBox "done"
0
 
LVL 1

Author Comment

by:Danimal
ID: 6868788
ok.....I'll start working with these....

one complication:  the ftp has to be over an ftps connection...with ssl

How do I add in that part?
0
 
LVL 1

Author Comment

by:Danimal
ID: 6868944
Great answer!!!  Worked perfect!

Thanks!

Pls note that there is another question now posted, as a followon to this one.  (posting it now...might be a minute)
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month9 days, 15 hours left to enroll

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question