Results 1 to 3 of 3

Thread: Adding a pause in a proceedure

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    2
    I have written some code to ftp a file from a local server and then search through my hard drive to find previous versions of the same file and then replace them.
    But the search always begins well before the file has copied over.
    How can I delay the file search until the ftp part of the program has finished.
    I dont want to put in a time delay because the file size will gradually increase so I really need to say...ok, pause until the ftp has finished....ok, thats finished....now start to search...

    Help!!!

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    I don't know your code at all, but is it the waiting procedure, it could look like this. But you need to know a way to retreive the condition that tells if the file is copied.

    (Starting to copy the file)
    .
    .
    Do
    doevents
    loop until (File is copied) <-- You have to set a condition
    .
    .
    (Search the drive)

  3. #3
    Lively Member
    Join Date
    Jun 1999
    Posts
    120
    I have a couple of suggestions here...

    1) Loop, determine if the ftp program (or task) is (still)
    running - if yes, continue loop, otherwise, end loop
    (you may want to see the tip
    "Determining Which Tasks Are Running"
    http://www.vb-world.net/api/tip147.html)

    OR

    2) If you called your FTP routine via "Shell",
    see the tip "How do I tell when an app executed
    using SHELL is finished?"
    http://www.vb-world.net/api/tip5.html

    hope this helps...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width