Consulting

Results 1 to 2 of 2

Thread: Checking for DOS executions

  1. #1

    Checking for DOS executions

    all, I have this line of code:
    PHP Code:
    Shell "ftp -n -i -g -s:" vPath "\FtpComm.txt " vFTPServvbhide 
    it executes a series of ftp commands in the DOS window using the txt file that is referenced. What I want is an indication of when the file has stopped executing and the DOS window is closed. That will tell me that my files are done uploading or downloading. Does anyone know if this is possible? Thanks!


    the txt file uses the following code:
    PHP Code:
    vPath "C:"
    vFTPServ Me.Combo1
    vFile 
    Me.List27
    fNum 
    FreeFile()

    Open vPath "\FtpComm.txt" For Output As #fNum
    Print #1, "USER " & sFtpUserName ' your login
    Print #1, sFtpPassword ' your password
    Print #1, "put " & """" & CurDir & vFile & """"
    Print #1, "close" ' close connection
    Print #1, "quit" ' Quit ftp program
    Close 

  2. #2
    VBAX Regular
    Joined
    Jan 2009
    Posts
    93
    Location

    Smile

    [VBA]
    Set objShell = CreateObject("WScript.Shell")
    strCommand = "cmd /c ftp -s:C:\FtpComm.txt " & vFTPServ
    objShell.Run strCommand, 0, True
    MsgBox "OK"
    [/VBA]

    HTH

    happy and sunny day, Pavel

Posting Permissions

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