Results 1 to 2 of 2

Thread: BAD FTP !

  1. #1
    Guest

    Red face

    I want to ftp the contents of a directory to my ftp server
    I get no errors in VB, I have no firewalls present, I have no problem opening a session, I get no files on my ftp server, aaagggghhhh

    I can't get no satisfaction, Please help me

    Code:
    Dim fs, f, f1, fc, fol, st
    Dim strSource As String
    Dim strDest As String
    Dim x As Integer
        Set fs = CreateObject("Scripting.FileSystemObject")
        Set f = fs.GetFolder(Text4.Text)
        Set fc = f.Files
        fol = Text4.Text
            With Inet1
                .Cancel
                .Protocol = icFTP
                .URL = "111.111.111.111"
                .UserName = "administrator"
                .Password = "******"
            End With
        For Each f1 In fc
            strDest = f1.Name
            strSource = fol & "\" & s
            Inet1.Execute "111.111.111.111", _
            "PUT " & strSource & " /inbound/" & strDest
            x = x + 1
        Next
    MsgBox x & " Files transfered"

    thanks
    B

  2. #2
    Lively Member
    Join Date
    Jan 1999
    Location
    Karjalohja, Finland
    Posts
    123
    Try this way:

    fol = Text4.Text
    With Inet1
    .Protocol = icFTP
    .URL = "111.111.111.111"
    .UserName = "administrator"
    .Password = "******"
    End With

    'Goto FtpServer Folder
    Inet1.Execute , "CD inbound"
    Do
    DoEvents
    Loop While Inet1.StillExecuting

    For Each f1 In fc
    strDest = f1.Name
    strSource = fol & "\" & s
    Inet1.Execute , "PUT " & strSource & " " & strDest
    Do
    DoEvents
    Loop While Inet1.StillExecuting
    x = x + 1
    Next

    - Dj4

Posting Permissions

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



Click Here to Expand Forum to Full Width