Originally posted by Renu Radhika:
but the links provided are to copy a file to another file.how will we get the list of all files in one folder.Then we have to iterate through that list and do the functionality provided in the links listed to copy the file I guess
This is more of IO question than a General Java Post
Anyway, Yes u have to get the list of files in the directory, iterate one by one and copy each of them.
for listing check
java.io.File class. The method is
list() . This method will give u the list of file in a directory.