title: Help regarding Runtime.getRuntime().exec() command usage in Android app
body: <p>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</p>
  
  <p>Below is the code snippet where I am trying to copy the contents from /
  sdcard/etc/data to /sdcard/etc/temp/</p>
  
  <p><strong>try
     {
     Process process = Runtime.getRuntime().exec("cp -r /sdcard/etc/
  data /sdcard/etc/temp");
     }catch (IOException e)
     {
      e.printStackTrace();
     }</strong></p>
  
  <p>I also tried  creating a soft link as an alternative.. Event that did
  not work.</p>
  
  <p><strong>try
     {
     Process process = Runtime.getRuntime().exec("ln -s /sdcard/etc/
  data /sdcard/etc/temp/data");
     }catch (IOException e)
     {
      e.printStackTrace();
     }</strong></p>
  
  <p>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!</p>
  
  <p>Thanks,
  Nik..</p>