🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #3776

Re: file upload over indy ftp client

#3776
From: Bob Gonder
Date: Wed, 27 Apr 2005 14:52
30 lines
1765 bytes
Ronnie wrote:

>Huuhh... This drives me insane... Upgrading is too complicated to me..
>But is there any other easyer ways to upload a file into a ftp server?

The Win32 API is pretty easy:

hInternetSession =  InternetOpen(
			__argv[0],
			INTERNET_OPEN_TYPE_PRECONFIG,
			NULL, NULL, 0);

hFTPSession = InternetConnect(  hInternetSession,
		"ftp.yourisp.com",
		INTERNET_INVALID_PORT_NUMBER,
		username, userpassword,
		INTERNET_SERVICE_FTP, 0,  (DWORD)0);

FtpPutFile( hFTPSession,
		from, to, FTP_TRANSFER_TYPE_BINARY, 0);

InternetCloseHandle( hFTPSession );
InternetCloseHandle( hInternetSession );


You can also use other Ftp functions such as
	FtpGetCurrentDirectory
	FtpFindFirstFile
	FtpGetFile
And others.
Technical Details
Message-ID: <rr8v61tr7a53dm1dfhufjj265tfjvc5e89@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <426e0ab8$1@newsgroups.borland.com> <426e72d3$1@newsgroups.borland.com> <426ea3c9@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,c963c09725818701
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Re: file upload over indy ftp client
Date: Wed, 27 Apr 2005 07:52:41 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <rr8v61tr7a53dm1dfhufjj265tfjvc5e89@4ax.com>
References: <426e0ab8$1@newsgroups.borland.com> <426e72d3$1@newsgroups.borland.com> <426ea3c9@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.77.41.182
X-Trace: newsgroups.borland.com 1114613554 67.77.41.182 (27 Apr 2005 07:52:34 -0700)
Lines: 32
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail