While doing file copy operation using java, if we come across an error saying
"The filename, directory name, or volume label syntax is incorrect"
then check the source filename which we are trying to copy and ensure there is no white space before or after the filename.
Better to use fileName.trim() before trying to copy
"The filename, directory name, or volume label syntax is incorrect"
then check the source filename which we are trying to copy and ensure there is no white space before or after the filename.
Better to use fileName.trim() before trying to copy
No comments:
Post a Comment