I am trying to copy a file using the following code:
File targetFile = new File(targetPath + File.separator + filename);
...
targetFile.createNewFile();
file
A very similar error:- " ... java.io.IOException: The filename, directory name, or volume label syntax is incorrect" was generated in Eclipse for me when the TOMCAT home setting had a training backslash.
The minor edit suggested at:- http://www.coderanch.com/t/556633/Tomcat/java-io-IOException-filename-directory fixed it for me.