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

Gets the current directory name on the FTP server.

function RetrieveCurrentDir: string;

String - Current directory name.

RetrieveCurrentDir is a String function that returns the name of the present working directory, or current directory, on the FTP server. 

RetrieveCurrentDir sends the FTP PWD command to retrieve the server response with the present working directory information. 

The return value for RetrieveCurrentDir will contain the current directory name with leading and trailing quote (") characters removed. 

Use ChangeDir or ChangeDirUp to select the current directory by path or relative position in the directory hierarchy.


  CurDirEdit.Text := AFtp.RetrieveCurrentDir;
Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.