I was able to solve my problem. Here is the solution:
Sonal,
In the best interest of the JavaRanch community, I would love to help with the problem you are having. Please post the text of your mail to the public forums so that everyone can benefit from your experience. There is probably somebody else that wants to do what you are doing and is having a similar problem.
Bodie ���
P.S. Your problem is in your use of xcopy, not your
Java. Try it like this:
xcopy c:\SourceDirectory\*.* c:\BackupDirectory /s
without the trailing \ on your backup directory and be sure to use the *.* in your source argument. When I used your syntaxt I got "Invalid Path - 0 files copied". When I modified the syntax lightly, I got it to work just fine.
Thanks to all.