Hi All,
I am trying to make use of Runtime.getRuntime.exec() command to copy a folder from one location to another on sdcard. But it seems like it doesn't work
Below is the code snippet where I am trying to copy the contents from / sdcard/etc/data to /sdcard/etc/temp/
try { Process process = Runtime.getRuntime().exec("cp -r /sdcard/etc/ data /sdcard/etc/temp"); }catch (IOException e) { e.printStackTrace(); }
I also tried creating a soft link as an alternative.. Event that did not work.
try { Process process = Runtime.getRuntime().exec("ln -s /sdcard/etc/ data /sdcard/etc/temp/data"); }catch (IOException e) { e.printStackTrace(); }
Could someone please help me on this. Am I using the Runtime in the proper way if not could you please suggest me an alternative.. Appreciate your help!
Thanks, Nik..