Results 1 to 7 of 7

Thread: Change dir and upload file on FTP!?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 1999
    Location
    SLOVENIA, Europe
    Posts
    110

    Post

    I have problem uploading file on specific directory on ALPHA ftp server.

    I can upload to default directory but
    changing directory with "CD [dir]" command
    doesn't work??!! (VB5.0).

    Privileges are not a problem.

    THNX, Ermin

  2. #2
    Lively Member
    Join Date
    Jan 1999
    Location
    Karjalohja, Finland
    Posts
    123

    Post

    Do you use Inet, Winsock or Api-function, when you call Ftp?

    - Dj4

  3. #3
    Guest

    Post

    Could you show us the piece of code u use?

    ------------------
    Vincent van den Braken
    EMail: [email protected]
    ICQ: <A HREF="http://www.icq.com/15440110]15440110[/URL" TARGET=_blank>
    [URL=http://www.azzmodan.demon.nl]http://www.azzmodan.demon.nl</A>




  4. #4

    Thread Starter
    Lively Member
    Join Date
    Aug 1999
    Location
    SLOVENIA, Europe
    Posts
    110

    Post

    url="243.23.43.43" 'I provide IP address
    direc = "tec"
    locfile= "c:\temp\dat.txt"
    hostfile = "dat.txt"
    inet1.execute url , "cd " & direc
    inet1.execute url , "put " & locfile & " " & hostfile

    maybe this will work
    hostfile = "\" & "tec" & "\" & "dat.txt"
    inet1.execute url , "put " & locfile & " " & hostfile

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Aug 1999
    Location
    SLOVENIA, Europe
    Posts
    110

    Post

    I connect to ALPHA not just with IP address, I provide username and password as well.

    ------------------

  6. #6
    Lively Member
    Join Date
    Jan 1999
    Location
    Karjalohja, Finland
    Posts
    123

    Post

    Try this:

    direc = "tec"
    locfile= "c:\temp\dat.txt"
    hostfile = "dat.txt"

    Inet.AccessType = icUseDefault
    Inet.Protocol = icFTP

    Inet.URL = "ftp.microsoft.com"
    Inet.UserName = "anonymous"
    Inet.Password = "[email protected]"

    Inet.RemotePort = 21
    Inet.RequestTimeout = 60

    Inet.Execute , "CD " & direc
    Do
    DoEvents
    Loop While Inet.StillExecuting

    Inet.execute , "PUT " & locfile & " " & hostfile
    Do
    DoEvents
    Loop While Inet.StillExecuting

    - Dj4

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Aug 1999
    Location
    SLOVENIA, Europe
    Posts
    110

    Post

    THNX, I find about DevPower FTP ActiveX control and I wrote code that works

    If FTP1.Connect("url", "un", "pw") = ftpSuccess Then
    FTP1.CD "tec"
    If FTP1.PutFile("C:\TEMP\TEC.TXT", "") = ftpSuccess Then
    FTP1.Disconnect
    End If
    End If

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