• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to copy file in Java

 
Bilal Ali
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,
I am working on a utility and want to develop it in Java,on a LAN we have two PCs P1 and P2, on P1 there is a shared folder in which a text file is present, when I will run my utility on P2 it will go on the specified folder path on P1 and copy the text file from P1 to P2, how can I avhieve this and is there a direct COPY method available in the java.io package, both machines are Windows based so I dont want to use FTP.
[ July 30, 2007: Message edited by: Bilal Ali ]
 
Joe Ess
Bartender
Posts: 9361
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java does not have an API method for copying a file. Have a look here and here for examples of copying files.
 
Bilal Ali
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankyou friend, you solved my problem
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!