Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Mar : IndyFTP and CD command
| Subject: | IndyFTP and CD command |
| Posted by: | "Mikael Lenfors" (mika..@lenfors.se) |
| Date: | Mon, 31 Mar 2008 17:59:16 |
Hello!
Check out the following FTP conversation done from a DOS prompt in XP.
C:\>ftp <servername>
Connected to <Servername>.
220 xTrade FTP server ready. Copyright (c) Xware AB.
User (<Servername>:(none)): <Username>
331 User '<username>' OK. Please enter password.
Password:
230-Welcome to FTP Server WMdata eBS Clearinghouse
Node is '<Username>'. Session Id is 763874123.
Connection time out limit is 300 seconds.
230 Logged in as '<Username>'.
ftp> cd "T: 61829" <- Works only with
CD, not CWD
250 Command successful.
ftp> put filename.log card214d080331.txt
200 PORT command successful.
150 Opening BINARY mode data connection for card214d080331.txt.
226-File accepted by server.
Message id 58226076
226 Transfer complete.
ftp: 28000 bytes sent in 0,00Seconds 28000000,00Kbytes/sec.
ftp>
Works perfectly. When I try to do the same thing from Indy FTP it fails! The
reason seems to be that when I do a ChangeDir with the Indy TIdFTP component
it sends the command CWD. How can I send CD instead?
I tried to use the SendCmd command, eg SendCmd('CD "T: 61829"'), but this
returns error code 500.
Any ideas?