Amitsharma
Amitsharma

Reputation: 1578

making Directory in sd card android in one click

i want to make directory in sd-card in android .And store audio file with in An ordered manner . How can i do this. Thank you i have done that but by this code i should make a directory in sd-card..

codeaudioFilePath = 
 Environment.getExternalStorageDirectory().getAbsolutePath() + 
"/amitaudio/audio.mp3";

File file = new File(filepath,amitaudio); 
if(!file.exists()){ file.mkdirs();  
} 

Upvotes: 0

Views: 82

Answers (2)

Amitsharma
Amitsharma

Reputation: 1578

For me this is working correctly :-

File amitaudio=new File(audioFilePath);

    amitaudio.mkdirs(); 

But i can not made ascending order creation of audio files please tell me ...thank you

Upvotes: 0

Cris
Cris

Reputation: 13341

String filepath = Environment.getExternalStorageDirectory().getPath();
File file = new File(filepath,/*Your folder name*/);
if(!file.exists()){
            file.mkdirs();           
        }

Upvotes: 3

Related Questions