|
String FOLDER_LIST[] = {"Test1", "Test2", "Test3", "Test4"};
for(int i = 0; i<FOLDER_LIST.length; i++){
tmp[][] = getFileCOntent(new File(drives["C:\\" + FOLDER_LIST + "\\"));
}
|
|
the above is supposed to go to all the 4 folders in the C:\ and copy the contents into a tmp array.. and then pass it to the final array..
the getFileCOntent() method takes in a File type, and gets all the files in the directory and stores and returns a 2D array to fill a jtable with the rows and columns..
the only problem i have is every time it does the loop, it wipes the contents of the files from the previous folders, only the last folder content is stored.. which is "Test4", how do I get the content of all the folders????
|
|
|
|
|
|
|
|