|
-
Aug 2nd, 2001, 04:28 AM
#1
Thread Starter
Hyperactive Member
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
-
Aug 2nd, 2001, 04:52 AM
#2
Fanatic Member
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....
-
Aug 2nd, 2001, 04:55 AM
#3
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.
-
Aug 2nd, 2001, 05:07 AM
#4
Fanatic Member
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....
-
Aug 2nd, 2001, 05:20 AM
#5
-
Aug 2nd, 2001, 05:20 AM
#6
...BTW, I recall it being able to upload.
-
Aug 2nd, 2001, 05:27 AM
#7
Fanatic Member
-
Aug 2nd, 2001, 08:34 AM
#8
Frenzied Member
I use this code to upload files that i wrote
VB Code:
Open App.Path & "\" & UsrNme & ".txt" For Output As #3
Print #3, Now; App.EXEName; App.Revision
Close #3
upld = FtpPutFile(hConnection, App.Path & "\" & UsrNme & ".txt", UsrNme & ".txt", 0, FTP_TRANSFER_TYPE_UNKNOWN)
If upld = 0 Then
Txt_Info.Text = Txt_Info.Text & vbNewLine & "Error Uploading, Will Continue Live Update - Restarting Program."
DoEvents
Else
Txt_Info.Text = Txt_Info.Text & vbNewLine & "Finished Uploading. Restarting Program."
DoEvents
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|