0

I have to copy images (4-6 MB each) periodically (each 8 seconds) into one folder. When a files count in the target folder reaches circa 320 files, an error is thrown. And if I restart an application, another circa 320 files are copied before an error is thrown again (so it is independent on a files count in a target directory):

java.nio.file.FileSystemException: X:\src\from.jpg -> X:\target\to.jpg: Not enough storage is available to process this command at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86) at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97) at sun.nio.fs.WindowsFileCopy.copy(WindowsFileCopy.java:205) at sun.nio.fs.WindowsFileSystemProvider.copy(WindowsFileSystemProvider.java:278) at java.nio.file.Files.copy(Files.java:1274)

I'm using Files.copy(f.toPath(), t.toPath()) to copy the file.

I think a problem si related to System Error. Code: 8. Not enough storage is available to process this command .

Is it possible to somehow clean used resources to avoid this Exception?

Community
  • 1
  • 1
Xdg
  • 1,735
  • 2
  • 27
  • 42
  • How do you name your files ? Do you overwrite the files ? – ortis Nov 06 '14 at 10:50
  • No, I have to keep all files so every filename is unique. – Xdg Nov 06 '14 at 10:52
  • Well it seems that you just dont have enough space on your HD. Either make some or write your files on a different location. – ortis Nov 06 '14 at 13:37
  • I have many free space. As I write above when I rerun my app, it writes 300 files again. It is not related to disk space. – Xdg Nov 06 '14 at 15:21
  • How much free space do you have then ? If the file names does not change, then it just overwrite the old one but once it get to actually create a new one, it crashes. – ortis Nov 06 '14 at 15:58
  • We are hitting this issue at a customer site (one out of many, many sites). I don't have anything to suggest at this time, just letting you know that you aren't alone. – Kevin Day Oct 06 '17 at 19:02

0 Answers0