Dart.Ftp Namespace > Ftp Class > Delete Method : Delete(String) Method |
Exception | Description |
---|---|
FtpProtocolException | The command did not succeed. |
private void deleteFiles() { //Delete a list of files (in this case, the txt files). ftp1.Delete(ftp1.ListDirectoryTree("MyTextFiles", "*.txt", false)); //Delete a specific file. ftp1.Delete("MyTextFiles/test.dat"); //Delete the directory, even when it is not empty. ftp1.DeleteDirectory("MyTextFiles"); }
Private Sub deleteFiles() 'Delete a list of files (in this case, the txt files). ftp1.Delete(ftp1.ListDirectoryTree("MyTextFiles", "*.txt", False)) 'Delete a specific file. ftp1.Delete("MyTextFiles/test.dat") 'Delete the directory, even when it is not empty. ftp1.DeleteDirectory("MyTextFiles") End Sub