How to categorize files once I push them to the SD CARD.
In case if I push a file with extension *.mp4 it should go to the music folder accordingly…Likewise all other files should go to their respective folders in the phone.
Do we need to create separate directories in order to achieve it
You can create directories based off of the suffix part of the file. Depending on the suffix, add the file to an appropriate directory name. If there is a conflict with that directory name just add the file to that directory, otherwise create a new directory and add it to the newly created directory. For example, a very simple example would look like: