Solved

How to do multible FTP uploads

Posted on 1998-10-01
4
147 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
Comment Utility
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
Comment Utility
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
Comment Utility
It is pure VB, you could also do as following :

Do while Inet.StillExecuting
   DoEvents
Loop

0
 

Expert Comment

by:dave_show
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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 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…
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…

762 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

11 Experts available now in Live!

Get 1:1 Help Now