FTPDELETE        Delete a file on an FTP site

Top  Previous  Next

Syntax:

FTPDELETE

[ file name ]

Arguments:

[ file name ]

Variable or string defining the file name(s) on the FTP site.

Options:

None

 

 

 

This script command deletes the specified file or files on the FTP site. This is an example of the FTPDELETE command:

 

FTPDELETE "file name"

 

Wildcard file names are permitted with the FTPDELETE command except when connected to a HTTP/HTTPS site. For example, the following command deletes all files with an extension of .txt from an server directory named inbound.

 

FTPDELETE "/inbound/*.txt"

 

The FTPDELETE command can only be used to delete remote files. To delete a local file, use the DELETE script command. Use the FTPDELDIR command to delete a remote directory.

 

Important

In SSH mode, FTPDELETE returns a success status if the file does not exist on the server. In other modes, FTPDELETE returns an error indicating that the file cannot be deleted.

 

After any remote files have been deleted, the %ftpdeletefiles internal script variable is automatically populated with the filenames of all such files.

 

Related command(s): FTPDELDIR, FTPRENAME, FTPCMD, Using the %deletefiles and %ftpdeletefiles Variables