This week's giveaway is in the OCPJP forum.
We're giving away four copies of Practice Tests for OCP Java 17 Certification Exam (1Z0-829) and have Paul Anilprem on-line!
See this thread for details.
Win a copy of Practice Tests for OCP Java 17 Certification Exam (1Z0-829) this week in the OCPJP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Problem in copying directory in Win-NT

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have made a backup program which creates a destination directory and then copies a source directory to this destination directory. In Win 98, I used xcopy32.exe from c:\windows\command and it runs properly. But when I try this program in a Win-NT m/c I face the following problems:
1. I changed xcopy32.exe of win 98 m/c to c:\i386\xcopy.exe in NT m/c. Still the program does not work and gives no error. The message shown is:
Directory created
0 files copied.
Though there are many files in the source directory it doesn't copy any.
Please help me. Thanks in advance.
My source code is:


[This message has been edited by sonal verghese (edited April 26, 2001).]
[This message has been edited by sonal verghese (edited April 26, 2001).]
 
sonal verghese
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic