Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in copying files from/to different machines using java

 
Priyha Jootu
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am trying to copy some files in a directory from one computer to another using java's Runtime.exec(). I want to copy some files from
\\d4598\public\soe_test\ directory to c:\try in my local machine. the "d4598" in the above is the machine name. I am mapping the remote machine d4598 to I: using "net use" command and then copying the files using "copy" command, but the copy command doesn't work, why is that?
Here's the code:

Since the copy didnt work, i tried to do it using the FileInputStream or bufferedstream, etc. First step is to see what files exist in that directory, even this doesn't work, what is wrong in my code, couldn't figure out.
Can anyone please help me with this?
Thanks,
Priyha
[ July 21, 2003: Message edited by: Priyha Jootu ]
 
Priyha Jootu
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error I am getting when i run this is:

Anyone know what it says?
Thanks,
Priyha
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic