Because many method which i have used does this, but they ll ultimately end up in copying each file by it conetents? as i have text files with lots of contents i will be a slow process?
thanks but if i want to apply a filter, fileutils will copy only the filter type of files. while i want the other way. ie except the filter type copy all.
GK
2010-01-06 14:51:00
Just implement a wrapper that inverts the filter
Jens Schauder
2010-01-06 14:59:06
Important note: as I pointed out lo so many moons ago, the version of Apache Commons IO that's in the svn repository uses Java's NIO to copy files and directories, which will give most users a *significant* IO boost. I have no clue why this hasn't made it out to the release stage yet, but I use it in any of my file/directory copying code, and it's much better.http://stackoverflow.com/questions/106770/standard-concise-way-to-copy-a-file-in-java/106807#106807
delfuego
2010-01-06 18:05:54
+1
A:
I would recommend something like FileUtils from Apache Commons IO.
The MYYN
2010-01-06 14:46:51
A:
I'm not sure if you want to move a directory, or or the files in it, but could you use renameTo and something like...
File origDir = new File("OrigDir");
File newDir = new File("NewDir");
origDir.renameTo(new File(newDir, origDir.getName()));
Miles D
2010-01-06 15:02:12