Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.4k views
in .NET FTP by
I've got the excerpts of my code below which never prints out the last line.
Any ideas please anyone?

FTPClient backup = new FTPClient();
backup.setRemoteHost(tftpHost);
backup.connect();
backup.login(pc.getUserName(), pc.getPassword());
backup.setConnectMode(FTPConnectMode.PASV);
backup.setType(FTPTransferType.BINARY);
backup.mkdir(fname);
backup.chdir(fname);

backup.put("test","test");

backup.quit();

System.out.println("are we done?");

1 Answer

0 votes
by (162k points)
It could be that your FTP server isn't compliant and doesn't respond to the QUIT command.

Try using QuitImmediately() instead.

I've got the excerpts of my code below which never prints out the last line.
Any ideas please anyone?

FTPClient backup = new FTPClient();
backup.setRemoteHost(tftpHost);
backup.connect();
backup.login(pc.getUserName(), pc.getPassword());
backup.setConnectMode(FTPConnectMode.PASV);
backup.setType(FTPTransferType.BINARY);
backup.mkdir(fname);
backup.chdir(fname);

backup.put("test","test");

backup.quit();

System.out.println("are we done?");

Categories

...