source code for FTP ASCII transfer. 
Author Message
 source code for FTP ASCII transfer.

Can anyone send me some source code to ftp a file using ASCII transfer.
I can't use the Inet control (binary only!), and I'm a little unsure how
to use the API calls.

I have tried the vbftpjr.vbp file from the microsoft KB, but I can't get
the thing to work. It gives me error messages of the sort "Too many
parameters" when I try to get a file.




Tue, 23 Jan 2001 03:00:00 GMT  
 source code for FTP ASCII transfer.
1. Start an Internet session, get the handle.
gethInternetSession = InternetOpen(insAgent, INTERNET_OPEN_TYPE_PRECONFIG,
vbNullString, vbNullString, 0)

2. Use the #1 handle to start a HTTP/FTP/Gopher/or-other-else service, get the
handle.
getFTPconx = InternetConnect(inhInternetSession, insFTP,
INTERNET_DEFAULT_FTP_PORT, vbNullString, vbNullString, INTERNET_SERVICE_FTP, 0,
0)

3. Use the successful hanlde #2 to perform tasks, like...

FtpGetCurrentDirectory(inhFTPSession, curdirFTP, Len(curdirFTP))

FtpSetCurrentDirectory(inhFTPSession, insDir)

FtpGetFile(inhFTPSession, insRemote, insLocal, False, FILE_ATTRIBUTE_NORMAL,
FTP_TRANSFER_TYPE_ASCII, 0)

FtpPutFile(inhFTPSession, insLocal, insRemote, FTP_TRANSFER_TYPE_ASCII, 0)

4. Remember to close the open session handles, #2 then #1.



Fri, 02 Feb 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. source code for FTP ASCII file transfer

2. source code to FTP an ASCII file

3. ASCII ftp transfer

4. How do I transfer using ASCII in FTP

5. FTP ASCII transfer

6. Internet Transfer Control and ASCII FTP

7. Forcing Inet to use ftp ASCII transfer

8. FTP ASCII Transfers

9. get unreable text file when using Internet Transfer Control to ftp(get) ascii fi

10. Ascii FTP Transfer

11. ASCII FTP Using Internet Transfer Control

12. Internet Transfer Control - FTP ASCII Files

 

 
Powered by phpBB® Forum Software