3 Replies Latest reply: May 3, 2013 9:51 AM by user13516599 RSS

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


      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.