Java tutorial
//package com.java2s; import android.os.Environment; import java.io.File; public class Main { public static File getAudioPath(String fileName, String folderName) { File file = new File(Environment.getExternalStorageDirectory() + File.separator + "InstavoiceBlogs" + File.separator + "audio" + File.separator + folderName); if (!file.exists()) { file.mkdirs(); } File audioFile = new File(file, "aud_" + fileName); return audioFile; } }