| Dart Home | PowerTCP FTP for ActiveX | Custom Development | Reply | PowerTCP FTP for ActiveX Topics | Forums |
| Author | Forum: PowerTCP FTP for ActiveX Topic: FTP to AS400 via USER proxy |
| User245 Posts: 4 Member Since: 02/14/02 |
posted February 14, 2002 10:58 AM We have access to an FTP server hosted on an AS400. We access it via our firewall / proxy which is a USER type proxy. Using the FTP tool and VB6, we can connect to the AS400 FTP server with Ftp Tool but attempts to use Ftp.Mget result in no files transferred. We can transfer the files manually via FTP so I tried to code in the sequence using Ftp.Command but I just get "500 command ... not recognised" in the Reply string even though the commands work with manual FTP. What am I doing wrong ?? |
K M Drake![]() From: Utica, NY USA Posts: 3406 Member Since: 07/14/00 |
posted February 14, 2002 12:55 PM Hi, What commands were you sending? For example, did you try sending "get" as you would from a command line? If so, then it would not work. When you type "get," the client actually sends out the corresponding Ftp command, in this case "RETR". Are you able to use the Ftp.Retrieve method to get your files? Thanks, -ken K M Drake Dart Tech Support |
| User245 Posts: 4 Member Since: 02/14/02 |
posted February 14, 2002 1:06 PM First I use Ftp.List to get a file listing. I then parse Ftp.Listing.Text to extract the actual filenames (the list format is type 2 - non standard). I then do an Ftp.Retrieve to get the individual files but although there is no error generated, there is no file transferred either. Trying to Ftp.Command "GET "+fileName results in "500 command not recognised" errors. I seem to be stuck. |
| User245 Posts: 4 Member Since: 02/14/02 |
posted February 14, 2002 1:12 PM Hold the bus!! Ftp.Retrieve works as long as I only provide a single argument (the file to retrieve). In this case, the file is transferred to the current directory. If I specify a target directory on the local machine as the second argument, nothing is transferred. e.g. Ftp.Retrieve fileName works Ftp.Retrieve fileName localDir fails Alan. |
K M Drake![]() From: Utica, NY USA Posts: 3406 Member Since: 07/14/00 |
posted February 14, 2002 3:18 PM Hi Alan, Are you including the filename in the second parameter? Below is a very simple project (button and Ftp control) to try. What happens when you run this? Thanks, -ken Option Explicit 'Fill these in Const remoteFile = "file.txt" Const host = "" Const user = "" Const pass = "" Private Sub Command1_Click() Ftp1.Trace App.Path & "\trace.log", True, True, vbCrLf & "Send->", vbCrLf & "Recv<-" Ftp1.Login host, user, pass Ftp1.Retrieve remoteFile, App.Path & "\" & remoteFile Ftp1.Logout End Sub K M Drake Dart Tech Support |
| User245 Posts: 4 Member Since: 02/14/02 |
posted February 15, 2002 3:56 AM You've found the problem, I was leaving the filename off the second parameter. When I do ftp.Retrieve fileName, localDir + filename it works. Thanks for your help. |
| Reply | PowerTCP FTP for ActiveX Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|