title: How to copy an entire content from a directory to another in Java?
body: <pre><code>File content[] = new File("C:/FilesToGo/").listFiles();
  
  for (int i = 0; i &lt; content.length; i++){                       
  
      String destiny = "C:/Kingdoms/"+content[i].getName();           
      File desc = new File(destiny);      
      try {
          Files.copy(content[i].toPath(), desc.toPath(), StandardCopyOption.REPLACE_EXISTING);
      } catch (IOException e) {
          e.printStackTrace();
      }                   
  }   
  </code></pre>
  
  <p>This is what I have. It copies everything just fine.
  But among the contents there are some folders. The folders are copied but the folder's contents are not.</p>