PDA

View Full Version : Checking for DOS executions



ajetrumpet
12-06-2009, 02:31 PM
all, I have this line of code:
Shell "ftp -n -i -g -s:" & vPath & "\FtpComm.txt " & vFTPServ, vbhideit 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:
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

hardlife
12-08-2009, 01:59 AM
Set objShell = CreateObject("WScript.Shell")
strCommand = "cmd /c ftp -s:C:\FtpComm.txt " & vFTPServ
objShell.Run strCommand, 0, True
MsgBox "OK"


HTH :hi:

happy and sunny day, Pavel