[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to do multible FTP uploads

Posted on 1998-10-01
4
Medium Priority
?
155 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 400 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

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

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

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…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

834 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