FTP file upload and download

Started by Marc van Cauwenberghe, April 30, 2012, 11:21:15 AM

Previous topic - Next topic

Marc van Cauwenberghe

Hi,

probably should ask this over at the PB board, but I will try it here first.
Does anyone have an example of connecting to a webserver, getting a file, changing it and putting it back?
Can it be done with powerbasic commands?

Any help is apreciated.

Marc

Wilko Verweij

Hi Marc,
I 've never done this but if I had to do this I would start with the TCP statements.
Success,
Wilko

Marc van Cauwenberghe

Thank you Wilko,

I want to try this with the TCP statement, but not a lot of info on it.

Marc

Jean-pierre Leroy

Marc,

I have a complete set of functions based on WinInet.dll if that could be of interest with FtpUpload() and FtpDownload() functions.

Regards,
Jean-Pierre

Jim Dunn

I noticed that Jose Roca has an include file called "msieftp.inc"...

' ########################################################################################
' Library name: MSIEFTPLib
' Version: 1.0
' Documentation string: MSIEFTP 1.0 Type Library
' Path: C:\WINDOWS\system32\msieftp.dll
' Library GUID: {6E8CEDE1-746A-11D1-91F7-006097DF5BD4}
' ########################################################################################
3.14159265358979323846264338327950
"Ok, yes... I like pie... um, I meant, pi."

Jim Dunn

Oh, and don't forget Don Dickerson's PBFTP.ZIP over at http://www.greatwebdivide.com/code_tcpip.htm

(all FTP functions, using TCP)

: )
3.14159265358979323846264338327950
"Ok, yes... I like pie... um, I meant, pi."

Marc van Cauwenberghe

Thank you Jean-Pierre,
That would interest me a lot. I have heard of WinInet.dll, is it a dll that you just put in the your application folder without any registration and such?

Thanks Jim, I will have a look.

So nobody uses the build in TCP commands, why?

Best Regards,
Marc

Marc van Cauwenberghe

#7
OK Jim,

You posted while I was typing (and being called away by my wife :) ).
So Don posted some TCP functions way back, still wonder why (and I looked at posts on the powerbasic forums) don't generally use TCP commands.

Thanks again,
Marc

Jim Dunn

Well, I can't speak for everyone else... but I like using the Windows API (instead of TCP commands) since it usually requires less coding for me, and many times the error handling is easier to debug.

And, not so much with FTP, but with HTTP/HTTPS, I use the Windows API which will automatically handle any proxy configuration the user might have.
3.14159265358979323846264338327950
"Ok, yes... I like pie... um, I meant, pi."