Solved

Simple Stumper - File Transfer from PC to Server on Web

Posted on 2002-03-15
5
147 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

735 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