I want to get the list of all documents present in the folder. Including the ones present in the folder's sub-folders. Currently am able to write a code only iterate through the documents present in the folder but not it's sub folders.
File dir = new File("C:\\Users\\...\\Forms");
File[] list = dir.listFiles();
for(int i=0; i<list.length;i++)
{
...
}
Is there a java code for a way to get all the documents from the folder including it's subfolders ?