1 import jcifs.smb.*; 2 3 public class CopyToTest extends Thread { 4 5 String url1, url2; 6 7 CopyToTest(String url1, String url2) { 8 this.url1 = url1; 9 this.url2 = url2; 10 } 11 12 public void run() { 13 for (int i = 0; i < 1; i++) { 14 try { 15 SmbFile file = new SmbFile(url1); 16 SmbFile to = new SmbFile(url2); 17 file.copyTo(to); 18 } catch (Exception e) { 19 e.printStackTrace(); 20 } 21 } 22 } 23 24 public static void main(String [] args) throws Exception { 25 CopyToTest cts = new CopyToTest(args[0], args[1]); 26 cts.start(); 27 Thread.sleep(50000); 28 } 29 } 30 | Popular Tags |