Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7616641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:56:18+00:00 2026-05-31T02:56:18+00:00

How to categorize files once I push them to the SD CARD. In case

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T02:56:20+00:00Added an answer on May 31, 2026 at 2:56 am

    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:

    File dir = new File("Music");
    if (!dir.exists()){
        //code here
    }else{
       //code here
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to load files in different categories according to theis file name. Till
I currently have a set of media files in the raw folder of the
I'm creating WebResources.resx file with several string messages I'd like to categorize: Signup_Status_Inactive Signup_Status_Reserved
Our assignment is to retrieve a file and categorize it and display it in
My search query is something like this SELECT files.id,files.file,files.name,files.uid,files.size,files.downloads,files.deleted,files.descr, files.upload_id,files.thumb,files.category,files.expirydate, MATCH(name,descr) AGAINST ('$all $none
I have a table of Products and one of ProductGroups to categorize them. Now
I'm trying to move a file on my server from one folder to another
Introduction: I want to loop through XML files with flexible categories structure. Problem: I
I am pulling categories from an xml file. I only have 5 categories but
I have a file that I open and parse and some of the categories

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.