I want create a program in which folder(level 0) is containing number of subfolder(Level 1) and each folder(subfolder Level 1) contain file number of file and subFolder (level 2).
now i want to copy folder(level 0) but from subfolder (level1) want sepecfic file and subfolder(level 2) rest want to remove
Is it possible to do that

please give me suggestion

Edited by bhallarahul

5 Years
Discussion Span
Last Post by JamesCherrill

DaniWeb Member Rules (which you agreed to when you signed up) include:
"Do provide evidence of having done some work yourself if posting questions from school or work assignments"

Post what you have done so far and someone will help you from there.
ps: This is not a hard assignment


Its not an assignment or school work
the thing is only ask is it possible or not

Edited by bhallarahul: add


OK, in that case: Yes, it's possible, it's actually quite easy.

If you have Java 7, use the NIO ("new I/O") classes; here's the excellent Oracle tutorial that tells you all you need to know:

If you are stuck on an earlier release for some reason you can still do the same thing using Java's original File class, but you'll have to download the old version of the tutorials from http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-tutorials-419421.html#tutorial-2008_03_14-oth-JPR

Edited by JamesCherrill

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.