title: Removing image/file name from path in android
body: <p>I have selected a file from a folder on the SD card, now I want to get that path without the file name attached, here is the code to how I am doing it:</p>
  
  <pre><code>currImageURI = data.getData();
  String name=getRealPathFromURI(currImageURI);
  </code></pre>
  
  <p>now name stores all the path like /mnt/sdcard/images/photo1.jpg.
  I want to remove photo1.jpg form this path, need help with this aspect thanks.</p>