Copy files from samba share

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gaya3
    New Member
    • Aug 2007
    • 184

    Copy files from samba share

    Hi All,

    I would like to have the simple java code that copy the files from samba share to local drive.

    When i tried with below snippet , file not found exception occured. Please do needful
    Code:
    try{
    				
    String source = "//IP.VV.YY.XXX//test//mm";
    File sourceFile = new File(source);
    FileInputStream stream = new FileInputStream(sourceFile);
    System.out.println("\n\n Input stream available >>>>>>>>>> "+stream.available()+"\n\n\n");
    
    }catch(Exception e){
    e.printStackTrace();
    }
    
    
    Exception:
    java.io.FileNotFoundException: \\IP.VV.YY.XXX\test\mm(The system detected a possible attempt to compromise security. Please ensure that you can contact the server that authenticated you.)
Working...