I want to create folder in sdcard. i am using following command in android terminal
cd sdcard mkdir music
mkdir failed for music, Permission denied.
While creating a directory, it is better to provide complete path instead of using cd
Use Environment.getExternalStorageDirectory()
to get the storage root directory.
Use the following command to create directory:
String filepath=Environment.getExternalStorageDirectory()+"/Music"
File fc=new File(filepath)
if(!fc.exists())
fc.mkdir();