Results 1 to 3 of 3

Thread: How do you tell when a process has ended?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2001
    Posts
    25
    I have a program that someone else wrote that allows the user to select a file with a windows common dialog, and then FTP that file to a specific server.

    I have been asked to change it so that it deletes the FTP'd file after the transfer is complete.

    The problem is this-
    The way that they were doing the FTP was by having WS_FTP installed on the PC and doing something like:

    strCommand = "ws_ftp.exe c:\mydir\myfile remoteaddress\remotedir\remotefile"

    shell(strCommand)

    Since a shell happens asynchronously, it returns to the running code before the transfer is complete, so if I delete the file then, it is not transfered, ws_ftp locks up, and all manor of unsavory things happen.

    Since shell returns the process ID of the process that it starts, how can I use that to determine when the transfer finishes, so I can then delete the file?

  2. #2
    Lively Member devmax's Avatar
    Join Date
    Mar 2001
    Posts
    67

    Cool

    take a look at this tip :

    http://www.vb-world.net/tips/tip5.html
    All what you dream is codable - DevMaX

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2001
    Posts
    25

    THANKS!

    Thank you very much. That seems to do the trick.

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