I created several folders in the sdcard (Eclipse) by running an Android application in the emulator. Now I want to delete the folders which I have created on the sdcard.
Well, answer from Brijesh Thakur is really helpful.
I just tried this and it worked fine for me to some extent. I would like to mention that if your directory contains any files then the rmdir
command will not work. You will have to use rm -r
command for that.
To make it more easy for beginners I am explaining the process as follows.
First you need to locate your adb folder, mine was at D:\Android SDK\platform-tools>
Now execute adb shell
in a command prompt as:
D:\Android SDK\platform-tools>adb shell
A hash (#) symbol or dollar sign ($) will appear, then enter the following command:
# cd sdcard
Now you are in the sdcard of the device. If your folder is a sub folder then further locate its parent folder using the cd
command. Finally, use the rm -r
command to remove the folder recursively as follows. This will delete all files and directories in the folder.
# rm -r FolderName
Please note that if you want to remove a single file you can use the rm
command only and then the file name (with extension probably). And you can also use rmdir
command if the directory you trying to delete is empty.