Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try{
- StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
- StrictMode.setThreadPolicy(policy);
- String user = "username";
- String pass ="password";
- //Archivo a Copiar
- String urlconvert = "smb://IP/Compartido/test12.txt";
- NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication(
- "DOMINIO.COM", user, pass);
- SmbFile sFile = new SmbFile(urlconvert, auth);
- //Destino
- String sharedFolder2="Test";
- String url = "smb://IP/" + sharedFolder2 + "/";
- SmbFile sDes = new SmbFile(url,auth);
- sFile.copyTo(sDes);
- }
Add Comment
Please, Sign In to add comment