Results 1 to 8 of 8

Thread: how can I FTP files within my app that I have just created ?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 1999
    Location
    UK
    Posts
    300

    how can I FTP files within my app that I have just created ?

    Hi
    My application creates 5 files , now after they are created I want to FTP them to an other machine which does not have a shared drive on the network so I can't filecopy them.
    Sooooooo how can I ftp the files from within the app ? I want to create the files and as soon as they are made FTP them to the other machine , I know the account and password of the machine they are going to.

    Any help or ideas would be great

    Many thanks
    locutus
    Resistance is futile

  2. #2
    Fanatic Member Gaffer's Avatar
    Join Date
    Nov 2000
    Location
    London
    Posts
    828
    Yup, use the Inet control. Play around with it, and if you have any more problems, bump the post again...

    I think there is a tutorial on VBSquare under Internet....

  3. #3
    chenko
    Guest
    You can also use the Winsock, a bit messy thou.

    Have a search on VBforums, there are ways of doing it with out controls, using a standard windows DLL.

  4. #4
    Fanatic Member Gaffer's Avatar
    Join Date
    Nov 2000
    Location
    London
    Posts
    828
    mmm, yeah, I seem to rememebr an API that had the facility to grab files via FTP, but not Put files. I find that although Inet is chunky, it was good for providing status messages during FTP actions....

  5. #5
    chenko
    Guest
    iNET seamed good, but It never worked for me!?!? and neither did all these 3rd party FTP componets for some reason

    I hate FTP

  6. #6
    chenko
    Guest
    ...BTW, I recall it being able to upload.

  7. #7
    Fanatic Member Gaffer's Avatar
    Join Date
    Nov 2000
    Location
    London
    Posts
    828
    Originally posted by chenko
    I hate FTP
    Only coz you can't use those 3rd party components properly

    Locutus, one thing to look out for if you are FTPing large files is determining when the transfer has occurred. When a file hits a UNIX environment, for example, you'll see an image of the file as soon as the FTP process has started. This doesn't mean the whole file has transferred...

  8. #8
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Brooklyn NY USA
    Posts
    1,258
    I use this code to upload files that i wrote
    VB Code:
    1. Open App.Path & "\" & UsrNme & ".txt" For Output As #3
    2.     Print #3, Now; App.EXEName; App.Revision
    3.     Close #3
    4.     upld = FtpPutFile(hConnection, App.Path & "\" & UsrNme & ".txt", UsrNme & ".txt", 0, FTP_TRANSFER_TYPE_UNKNOWN)
    5.  
    6.     If upld = 0 Then
    7.         Txt_Info.Text = Txt_Info.Text & vbNewLine & "Error Uploading, Will Continue Live Update - Restarting Program."
    8.         DoEvents
    9.     Else
    10.         Txt_Info.Text = Txt_Info.Text & vbNewLine & "Finished Uploading. Restarting Program."
    11.         DoEvents
    12.     End If

    If you need the complete usage of the FTPPutFile API please post

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