Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.4k views
in Java FTP by
hi, I was trying to delete all the files in a directory.....
so, I was doing like this....

files = ftp.dir(".", true);
for (int i = 0; i < files.length; i++)
     ftp.delete(files[i]);


but here is the problem... that files[i] is not the actual file name....
because it is something like this...

-rw-r--r--    1 test    users        1423 Mar  3 18:26 testing file.xml


so, how can I get the actual filename (testing file.xml) from this??

Thanks!...

1 Answer

0 votes
by (51.6k points)
Try using the dirDetails method instead of the dir method.

- Hans (EDT)

Categories

...