Solved

How to do multible FTP uploads

Posted on 1998-10-01
4
148 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

943 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

Need Help in Real-Time?

Connect with top rated Experts

5 Experts available now in Live!

Get 1:1 Help Now