This discussion is archived
3 Replies Latest reply: May 3, 2013 7:51 AM by 1006951 RSS

Problem copying a file from source(windows) to destination(windows) in java

1006951 Newbie
Currently Being Moderated
Hello,

I have a problem to implement with Java. Where I have a file sitting on a windows location and I wanted to copy that file from that location to a new location which is also a windows location, my java application is running on AIX(Unix) server. Please advise, what are all my options, I can perform this task.
I would like to do it through a java program.

Scenario: Source-> Windows server S1 \\server1\folder\file
Destination -> Windows server S2 \\server2\folder

I have already tried, commons apacha FileUtil.copyFileToDirectory.. it is throwing an exception FileNotFoundExcetion for Source.

Please advise.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points