Link to home
Start Free TrialLog in
Avatar of Aurii
Aurii

asked on

Copy and Paste folder through Java code

I want to copy folder from one path and paste it to another path through Java code for backup purpose. How to do it. Please help
Avatar of for_yan
for_yan
Flag of United States of America image

Do you mean you want to move folder from one location to another?
That can be done recursively, traversing the folder and copying the files.




And this is moving folders from t he same source:
http://www.roseindia.net/java/example/java/io/MovingFile.shtml
ASKER CERTIFIED SOLUTION
Avatar of ksivananth
ksivananth
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mick Barry
you can use this code to traverse the directory
http://helpdesk.objects.com.au/java/how-to-recursively-traverse-a-directory-tree

far easier to do it from the command line instead of java though