Topic Path: Symbol Reference > Classes > TIdFTP Class > TIdFTP Methods > ChangeDirUp Method
TIdFTP.ChangeDirUp Method

Changes to the parent directory on the FTP server.

procedure ChangeDirUp;

ChangeDirUp is a procedure used to change the current directory up one level in the file system for the FTP server. 

ChangeDirUp sends the FTP CDUP command to change to the parent directory on the servers file system. 

RFC 959 indicates that reponse code 200 is the proper success response code for the CWUP command, but mentions that CDUP may also returns the 250 response code permitted for CWD. Indy will recognize both response codes 200 and 250 as the success response code for the CDUP command. 

According to RFC 959, ChangeDirUp may encounter any of the following error responses in the FTP protocol: 


Syntax error, command unrecognized. (This may include errors such as command line too long.) 
Syntax error in parameters or arguments. 
Command not implemented. 
Service not available, closing control connection. (This may be a reply to any command if the service knows it must shut down.) 
Not logged in. 
Requested action not taken. File unavailable (e.g., file not found, no access). 


When one of these protocol error responses is received, an EIdProtocolReplyError is raised. The ReplyErrorCode for the exception is set to the numeric portion of the protocol response. The Message for the exception is set to the textual part of the protocol response, and may vary based on the exact values returned from the server implementation. 

Use the ChangeDir method to move to a specified directory on the server file system.



Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.