I am reading a directory of files and attempting to ftp the whole directory to my web server using the internet transfer control.
I keep getting the error
"still executing last request" on the execute statement
is there a way to hold the loop up until the previous
request has finished, or is there a way I can ftp a whole directory in batch mode or something
Code:Dim fs, f, f1, fc, s, fol, st Dim source As String Dim x As Integer Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFolder(directory) Set fc = f.Files fol = Text4.Text With Inet1 .Cancel .Protocol = icFTP .URL = "xxx.xxx.xxx.xxx" .UserName = "xxxx" .Password = "xxxx" End With For Each f1 In fc s = f1.Name source = fol & "\" & s Inet1.Execute "xxx.xxx.xxx.xxx", _ "PUT " & source & " /" & s x = x + 1 Next MsgBox x & " Files transfered"




Reply With Quote