TFtp tf = new TFtp();
FtpClient client = new FtpClient(tf.getFtpAddress(), tf.getPort().intValue());
client.login(tf.getFtpUsername(), tf.getFtpPwd());
client.binary();
String cmd = "DELE " + tf.getRootList()+"/"+ti.getPath() + "/r/n ";
client.sendServer(cmd);
以上是远程删除ftp文件的语句,但是注意在循环删除时,要在for里每次都new FtpClient()一遍.......
FtpClient client = new FtpClient(tf.getFtpAddress(), tf.getPort().intValue());
client.login(tf.getFtpUsername(), tf.getFtpPwd());
client.binary();
String cmd = "DELE " + tf.getRootList()+"/"+ti.getPath() + "/r/n ";
client.sendServer(cmd);
以上是远程删除ftp文件的语句,但是注意在循环删除时,要在for里每次都new FtpClient()一遍.......