Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Uploading files to a Web Server using FTP 4

Status
Not open for further replies.

VBQuery

Programmer
Apr 2, 2001
14
US
Hi guys
I have a question for you.
My application loads reports from Crystal and it should save them in a network directory. And more important is all files are to be uploaded to Web sever using FTP.
There is no kind of visual interface involved at any stage of application.
I am new to VB programming. How do I design the application which uses the FTP from with in the application and go to the network directory and upload all the files to a specific directory on the webserver.
Help me outttttttttt!!!

Thanks in advance
 
can U pls email Ur activex dll. Much appreciated.
thanks.
My email: sukip@hotmail.com
 
Can I get a copy of it please? My email is cxde2000@yahoo.com.
Thanks in advance.
 
I would be interested in purchasing a copy. If you've put this much work into it, you should be compensated. If you're interested, I may be able to help you market it.

Thanks,
The Gun

myveryownpc@hotmail.com

 
Dear sodakotahusker,

Could I have a copy too, please...

My email is dhalleran@yahoo.com

Thankyou

DH01
 
Sodakotahusker,
Can your program upload several files at once? I need an application that will ftp upload c:\up\*.zip and c:\up\*.txt, without the user having to select one, upload it, select another, upload it, ad naus.

Thanks !
 
I just found this forum and have been having trouble FTPing to HTaccess protected areas because of the bug in ITC sp2 (I have VB5.) Does your activeX control use ITC? There's no way I can dl the 53M sp3 to upgrade, so I have to find another way. Sigh.

Gelbraen
 
would love to have a copy if it is still open.

rzcam@yahoo.com

Thanks
 
Could I have a copy please to?

Da_Stopher@yahoo.com

Thanx
;) Stopher
 
mleckie@tnrcc.state.tx.us would like the code too if it is still available. thanks
 
sodakotahusker,

could i please get a copy of your source code.

Thanks

Stu Mac
tek-tips@stumac.f9.co.uk
::)
 
Could I have A example of your Active X end cource Code to please

rembrechts@schoeller.be
 
hi
I would be very happy to get your activex sourse
thks
petya
 
-----------------------------------------------------------

Private Declare Function InternetCloseHandle Lib "wininet.dll" (ByVal HINet As Long) As Integer
Private Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA" (ByVal sAgent As String, ByVal lAccessType As Long, ByVal sProxyName As String, ByVal sProxyBypass As String, ByVal lFlags As Long) As Long
Private Declare Function InternetConnect Lib "wininet.dll" Alias "InternetConnectA" (ByVal hInternetSession As Long, ByVal sServerName As String, ByVal nServerPort As Integer, ByVal sUsername As String, ByVal sPassword As String, ByVal lService As Long, ByVal lFlags As Long, ByVal lContext As Long) As Long
Private Declare Function FtpGetFile Lib "wininet.dll" Alias "FtpGetFileA" (ByVal hFtpSession As Long, ByVal lpszRemoteFile As String, ByVal lpszNewFile As String, ByVal fFailIfExists As Boolean, ByVal dwFlagsAndAttributes As Long, ByVal dwFlags As Long, ByVal dwContext As Long) As Boolean
Private Declare Function FtpPutFile Lib "wininet.dll" Alias "FtpPutFileA" (ByVal hFtpSession As Long, ByVal lpszLocalFile As String, ByVal lpszRemoteFile As String, ByVal dwFlags As Long, ByVal dwContext As Long) As Boolean

Private Sub Command1_Click()
Dim INet As Long, INetConn As Long, RC As Boolean
INet = InternetOpen("MyFTP Control", 1, vbNullString, vbNullString, 0)
INetConn = InternetConnect(INet, "ServerURL", 0, "yourlogin", "yourpassword", 1, 0, 0)
RC = FtpGetFile(INetConn, "/path/file.ext", "c:\path\filename.ext", 0, 0, 1, 0)
If RC Then MsgBox "Transfer succesfull!" Else MsgBox "Bummer, it didn't work"
InternetCloseHandle INetConn
InternetCloseHandle INet
End Sub
-----------------------------------------------------------
See for more. Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
Looking at the dates of the original posts I suspect that sodakotahusker is no longer around to post a FAQ...
 
I would really appreciate the code if the offer is still there...THANKS!!!!!!!!!!

Pat

rbenito@bandrsolutions.com
 
Hi sodakotahusker,

Could I have a copy too, please...

My e-mail is asnetusa@aol.com

Thanks a lot,

Juan C
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top