Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.5k views
in Java FTP by
Hi
I am unable to get the following code to work

public void printCurrentDirectory() {
try{
// get directory and print it to console
System.out.println("Directory: ");
String[] files = ftp.dir(".", true);
for (int i = 0; i < files.length; i++)
System.out.println(files[i]);
} catch (FTPException exFTP) {
System.out.println("FTP Exception " + exFTP.getMessage());
} catch (Exception ex) {}

Basically this is the code taken from your Demo.java example.
It fails (throws exception) on the files = ftp.dir... line. with message "file not found"

Can you help?

Kieran

1 Answer

0 votes
by (162k points)
Can you post the stack trace and if possible, the log file


Basically this is the code taken from your Demo.java example.
It fails (throws exception) on the files = ftp.dir... line. with message "file not found"

Can you help?

Kieran

Categories

...