Solved

How to do multible FTP uploads

Posted on 1998-10-01
4
152 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
[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
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
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…

726 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