all,
i have gotten it down, but I think the problem is still present. I have this code for shelling an ftp text file:Dim fso
Dim oFile
'Dim varitem As Variant
Dim CurDir As String
Dim CurRemoteDir As String
Dim vPath As String
Dim vFile As String
Dim vFTPServ As String
Dim fNum As Long
Screen.MousePointer = 11
Set fso = CreateObject("Scripting.FileSystemObject")
Set oFile = fso.createtextfile("c:\inProgress.txt", True)
oFile.writeline "contents"
oFile.Close
vPath = "C:"
vFTPServ = Me.Combo1
CurDir = Me.Text26
CurRemoteDir = Me.Text1
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, "dir > c:\inProgress.txt"
If sFtpHostName <> Me.Combo1 Then
Print #1, "cd " & Left( _
Right(CurRemoteDir, Len(CurRemoteDir) - InStr(CurRemoteDir, "/")), _
(Len(CurRemoteDir) - 1))
End If
Print #1, "put " & """" & CurDir & vFile & """"
'Print #1, "!"
'Print #1, "del c:\inProgress.txt"
'Print #1, "exit"
Print #1, "close" ' close connection
Print #1, "quit" ' Quit ftp program
Close
Shell "ftp -n -i -g -s:" & vPath & "\FtpComm.txt " & vFTPServ, vbMaximizedFocus
what I am trying to accomplish is to get an indication of when the ftp session is over and the DOS window has been closed, thus telling me that all of the commands have been executed.
This is in VBA, so maybe a different forum would be the best now?