I want to copy all the contents of a folder to another folder on SDCard. I want to do it at OS level. I've tried using the following command : cp -a /source/. /dest/, this doesn't work, It says Permission Denied as my device is not rooted. However an interesting thing is that it allows me to execute rm - r source
String deleteCmd = "rm -r " + sourcePath;
Runtime delete_runtime = Runtime.getRuntime();
try {
delete_runtime.exec(deleteCmd);
} catch (IOException e) {
Log.e("TAG", Log.getStackTraceString(e));
}
Kindly tell me if there exists a way through which i can achieve this at OS level else my last resort will be this LINK. Thanks in advance.