Internet Direct (Indy)
Home
PreviousUpNext
TIdFTP.Delete Method

Removes a file on the FTP server file system.

Pascal
procedure Delete(
    const AFilename: string
);
Parameters 
Description 
AFilename 
File to be deleted from the FTP server file system. 

Delete is a procedure used to remove the file specified in AFilename from the file system on the FTP server. Delete implements the FTP DELE command using the value in AFilename as an argument. 

Delete expects the numeric response code 250 to indicate successful completion of the FTP command. If AFilename does not represent a valid file in the current directory on the server's file system, or contain a valid file name using a relative path, a protocol response exception will be raised. 

Please note that the FTP server may not grant delete permissions for the session based on account information specified in the Username and Password properties. This is common practice for clients using Anonymous accounts. 

Use Get to retrieve a file stored on the FTP server file system. 

Use Put to store the contents of a local file onto the FTP server file system.

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.