FtpDeleteFile

Top  Previous  Next

 

The FtpDeleteFile command allows you to delete one or more specified files in specified location using FTP or SFTP transfer protocols.

 

Command Syntax

 

FtpDeleteFile:[SourceFileName(s)],[Host],[Port],[UserName],[Password],[Protocol]

 

The colon after the command and the commas between parameters are compulsory. Any additional spaces or characters will cause an error to be thrown. The command itself is not case sensitive, but parameters may be depending on the operating system and locale.

 

Parameters:

 

SourceFileName(s): The fully qualified path and file name(s) identifying the file(s) to copy, separated by Pipe characters if there are multiple files. This value must be enclosed in quotes if more than one file is specified or there are any spaces in any of the the path and file names.

Host:The FTP or SFTP server to receive the Delete command

Port: The port on which the server will communicate

UserName: The username for the server

Password: The password for the server

Protocol: A string representing a valid member of the TransportProtocol enumeration, currently one of the following values: FTP, FTPS, SFTP

 

All parameters are compulsory. If any parameter is missing or invalid an error will be thrown.

 

Example:

 

FtpDeleteFile:"/home/www/test/files/Test Text.txt",my.server.com,mypassword,22,SFTP,MyUserName

 

See Also: FtpDeleteFilesOlderThanSpecifiedDate FtpDeleteFilesOlderThanXDays FtpDownload FtpUpload