Internet Direct (Indy)
Home
PreviousUpNext
TIdFTP.RetrieveCurrentDir Method

Gets the current directory name on the FTP server.

Pascal
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.

[Delphi]

  AFtp.ChangeDirUp;
  CurDirEdit.Text := AFtp.RetrieveCurrentDir;
  AFtp.List;
Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.