0

I use this code line to create folder in storage of phone:

File folder = new File(Environment.getExternalStorageDirectory() +
            File.separator + "Books");

boolean success = true;
if (!folder.exists()) {
    success = folder.mkdir();
}

how i get path of that folder to add books in that folder programatically.i use this line to get folder path but it just give path till storage...

destination = Environment.getExternalStorageDirectory()+File.separator+"Books";

i want the path of books folder exactly...

Juan Cruz Soler
  • 8,172
  • 5
  • 41
  • 44
shukar
  • 19
  • 2
  • refer http://stackoverflow.com/questions/21724706/how-to-get-my-android-device-internal-download-folder-path – sasikumar Jun 20 '16 at 03:22

1 Answers1

1

Try this,

folder.getAbsolutePath();

this will return you absolute path of file

Pramod Waghmare
  • 1,273
  • 13
  • 21