Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sample FTP program

Status
Not open for further replies.

nkiefer

Programmer
May 21, 2001
86
US
I have an Access MDB file on my web site that I would like to have my clients download as new versions become available. My thought is to have have them ftp the new version to their PC as needed. Maybe have an exe file that ftp's the latest version to a specific folder on their pc using an ini file. The ini file will hold the source and destination folders in it.

Does anyone have a sample of how I could do this using vb6.0?

 
I download an example from Microsoft a year or so ago, that allowed the use of HTTP or FTP to tranfer files. I do not remember exactly where I got it.

Try searching this forum or for the INet control.
 
Add a Microsft Internet Transfer Contol names Inet1 to a form and the use the following code as an example.
---------
Dim GL_SourceFileNameDC As String
Dim GL_SourceFileNameEN As String

Inet1.AccessType = icFTP
Inet1.Url = "ftp://192.0.0.1" 'FTP Address
Inet1.UserName = "user" ' Username for the ftp Server
Inet1.Password = "pass" ' Password for the ftp Server

GL_SourceFileNameEN = "c:\File.zip"
GL_SourceFileNameDC = "File.zip"
Inet1.Execute , "GET " & GL_SourceFileNameDC & " " & GL_SourceFileNameEN
Do While Inet1.StillExecuting = True
DoEvents
Loop
---------

Hope this does the job.

Hammy.
 
Here is a thread where I answered this very question for a guy: thread708-970319

LF

"As far as the laws of mathematics refer to reality, they are not certain; as far as they are certain, they do not refer to reality."--Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top