Hi,
I'm facing a strange situation using the "org.apache.commons.net.ftp.FTPClient" library.
I'm doing a simple download from a FTP server. I've test my code many times and it always worked, but on production, it creates the file with the correct name but it doesn't write de data inside the new file. It also doesn't return any error.
My code:
File newFile = new File(localFolder+"\\"+file.getName());
FileOutputStream fos = new FileOutputStream(newFile);
ftpClient.retrieveFile(remoteFolder + "\\" + file.getName(), fos);
fos.close();
Where the object
file is my file name and
localFolder is where the file is.
Anyone ever faced that problem before?
Thanks,
MJalbert