I am trying to get my inet control to put a file from one file folder, to a backup file folder on an ftp site.

When I use the same arguments and do it manually, the file is copied to the correct file folder.

When I try to run it with my code using the inet control, no file is copied.

Can someone tell me why?

Here is my code.
VB Code:
  1. With Menu.Inet1
  2.         .URL = strUrl
  3.         .UserName = strUser
  4.         .Password = strPass
  5.         .Execute , "cd " & strFile1
  6.         Do While Menu.Inet1.StillExecuting = True
  7.             DoEvents
  8.         Loop
  9.         .Execute , "DIR"
  10.         Do While Menu.Inet1.StillExecuting = True
  11.             DoEvents
  12.         Loop
  13.         Do
  14.             DoEvents
  15.             var_data = Menu.Inet1.GetChunk(1024, icString)
  16.             str_data = str_data & var_data
  17.         Loop Until Len(va_data) = 0
  18.         str_data = Trim(str_data)
  19.         If str_data <> "" Then
  20.             strftpfiles = Split(str_data, vbCrLf)
  21.             For i = 0 To UBound(strftpfiles)
  22.                 Debug.Print strftpfiles(i)
  23.                 If Left(strftpfiles(i), 6) = "D50" & strStore Then
  24.                     .Execute , "PUT " & Trim(strftpfiles(i)) & " Backup\" & Trim(strftpfiles(i))
  25.                     Do While Menu.Inet1.StillExecuting = True
  26.                         DoEvents
  27.                     Loop
  28.                 End If
  29.             Next i
  30.         End If
  31.     End With

The key line of code is this:
.Execute , "PUT " & Trim(strftpfiles(i)) & " Backup\" & Trim(strftpfiles(i))

This looks like this... "Put D50002.600 Backup\D50002.600"

Thanks