HOW TO DELETE FOLDERS CREATED BY ANDROID ON SD-CARDS AND EXTERNAL DRIVES WITH ONE CLICK OR KEYSTROKE

HOW TO DELETE FOLDERS CREATED BY ANDROID ON SD-CARDS AND EXTERNAL DRIVES WITH ONE CLICK OR KEYSTROKE

Have you ever been pissed off by loads of junk folders like “Music”, “Pictures”, “Movies”, “DCIM”, “LOST.DIR”
on sd-cards and OTG flash drives that are created by Android?

There is no easy way to avoid their creation, because this “feature” is hardcoded into Android core.
Of course we can root the phone and hack the system by means of Xposed framework or something similar, but we won’t do it today.
I’m in a hurry and will provide you a quick and dirty solution for this problem.

Create following batch or cmd file in the root of the flash-drive or sd-card:

@echo off 
for %%F in (Movies Music Pictures DCIM LOST.DIR) do (if exist %%F (rd /s /q %%F))

If you want to add additional folders to the removal list just add them separated by spaces here:

 in (Movies Music Pictures DCIM LOST.DIR Folder1 Folder2)

If you are a complete Linux-like keyboard junkie and execute all commands only in shell don’t forget to replace double “%%” with single “%”:

for %F in (Movies Music Pictures DCIM LOST.DIR) do (if exist %F (rd /s /q %F))

That’s it, hope you learned something.