Solved

How to do multible FTP uploads

Posted on 1998-10-01
4
150 Views
Last Modified: 2010-04-30
Hi guys.
I have made a program which uploads an web page to my server.
Thats no problem, but i don't seem to be able to test when the upload has finished, and then start a new one!

What i want to do is upload about 10 pages to my server, and then the program should terminate by it self!
As i said, i managed to start the uploading of ONE file, but how do i find out when the current upload is done, and its safe to start a new one?

I hope someone can help, as this is really driving me mad!
0
Comment
Question by:freak022398
  • 2
4 Comments
 
LVL 14

Accepted Solution

by:
waty earned 200 total points
ID: 1437610
Here is the code I use to upload files :

Inet.Execute Inet.URL, "PUT " & gsCheckDirectory & sRacine & gsWord & " " & LCase(sRacine & gsWord)
FTPWaitForResponse
If (Inet.ResponseCode <> 0) Then
   Log "Error uploading WORD file for " & sRacine, LOG_TYPE_ERROR
     
   ' *** Close the connection
   Inet.Execute Inet.URL, "CLOSE"
   FTPWaitForResponse
           
   SendFTP = False
   GoTo END_FTP
End If


Sub FTPWaitForResponse()
   ' *** After executing an FTP command, we have to wait for it to complete
   ' *** before we undertake any further processing.

   Do Until Not Inet.StillExecuting
       DoEvents
   Loop

End Sub

0
 

Author Comment

by:freak022398
ID: 1437611
Hmm, that doesnt seem to work!
What i probably forgot in my own atempts it the

  Do Until Not Inet.StillExecuting
     DoEvents
  Loop

lines, but the do until say it need an expression !?
What couldt be wront?

Martin.

0
 
LVL 14

Expert Comment

by:waty
ID: 1437612
It is pure VB, you could also do as following :

Do while Inet.StillExecuting
   DoEvents
Loop

0
 

Expert Comment

by:dave_show
ID: 12895633
Dear ppl

This code worked perfect form me
the call to FTPwaitForResponse must be placed before
inet.execute

Sub FTPWaitForResponse()
   ' *** After executing an FTP command, we have to wait for it to complete
   ' *** before we undertake any further processing.
    Do While Inet1.StillExecuting
        DoEvents
    Loop
End Sub
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

839 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