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

  • Home
  • SEARCH
  • 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 443487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:10:33+00:00 2026-05-12T21:10:33+00:00

I am writing an application which will search for a particular file or files

  • 0

I am writing an application which will search for a particular file or files from the respective path. During searching i need to deploy a progress bar which must run according to the search. so how i can do that? and if possible please post the code?

  • 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-12T21:10:34+00:00Added an answer on May 12, 2026 at 9:10 pm

    This is a tricky question. I don’t recall seeing any instance of a non-indexed search showing a progress bar. (Can anyone prove me wrong?)

    I’d suggest the following method (an extension of Benny Hallett’s suggestion) that might provide more granuity.

    Let’s assume that you’re searching for a specific filename pattern across an entire filesystem (e.g. in unix, searching for all *.jpg files on /)

    Start by dividing your progress bar into N pieces (where N is the number of directories in the root path of your search).

    Each time you go deeper into the directory heirachy, the total process bar length that was allocated to the parent directory is divided up depending on the number of sub-directories it contains. When the search of a directory is complete, the portion that was allocated to it is added to the progress bar. For even more detail you can further divide the allocation by the number of files + directories in the current directory.

    This method should ensure that you only have to traverse the directory structure once and it should handle uneven directories better. (By uneven I mean a mixture of directories with high and low search costs)

    As an example, let’s assume a directory structure like so:

    /
        clipart
        photos
            family    
            holiday
        wallpapers
            anime
            landscapes
    

    (each indent indicates a level deeper in the directory tree and let’s assume that all directory traversal is done in alphabetical order)

    You start off by looking at ‘/’ and seeing that there are three directories (clipart, photos and wallpapers) and thus you initially divide up the progress bar into thirds.

    You then search the clipart directory and when finished, updated your progress bar to one third. You then go inside photos and see that there are two sub-directories. This then means that when you finish searching family you add one sixth to the progress bar as there are two sub-directories (family and holiday) and progress against each one of these constitutes one half the one third allocated to photos.

    So in summary:

    completion of clipart adds one third

    completion of photos/family adds one sixth

    completion of photos/holiday adds one sixth

    completion of wallpapers/anime adds one sixth

    completion of wallpapers/landscapes adds one sixth

    For a total of 1.0 (or 100%) (ignoring floating point precision)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing an iOS application which will be sent notifications over APNS from
I'm writing an application which will have two Activities, when the user presses the
I'm writing a Rails application which will monitor data quality over some specific databases.
I'm writing a program in Ruby that downloads a file from an RSS feed
i am writing an application in which i am creating web services. i am
i am writing an application in java that takes backup of files on server.It
I am writing an application similar to a chat server-client pair. I am planning
I am writing an application where i have to interact with MS SQL database.
I have writing Java code Using Jersey library to call Rest APIs. For my
Executive summary: How can I define an arbitrarily-sized 2D array in C? How can

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.