codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  array copy  sam_02 at 09:57 on Monday, February 05, 2007
 


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????








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: I want to help - print preview
•  Re: No progress bar during download.
•  array copy
•  byte swapping in Perl
•  close window
•  Passing Variable To js File
•  Re: Compiling JAVA code in .NET?
•  managed nd unmanaged code..
•  Looking for free form submit php script?


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007