java.io.FileNotFoundException: C:\Emails\ToSend\. (Access is denied)
I'm trying to download a file from FTP and save it to a folder to be processed, But when I setup the OutputStream it throws this error. Here is the code:
File downloadFile1 = new File("C:" + File.separator + "Emails"
+ File.separator + "ToSend" + File.separator
+ f.getName());
OutputStream outputStream1 = new BufferedOutputStream(
new FileOutputStream(downloadFile1));
The FTPFile f is fetched by the FTPClient from the FTP server. I've got full control of the folder Emails and all of its sub folders and I have given these same permissions to all application packages.
I'm sure its just because I'm abit out of my depth when it comes to file permissions.
Any and all help appreciated