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 833811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:34:36+00:00 2026-05-15T04:34:36+00:00

Is there any crossplatform C\C++ lib for files searching? (on hard drive) What I

  • 0

Is there any crossplatform C\C++ lib for files searching? (on hard drive) What I need is simple – be able to find all images on users computer in all folders and subfolders with sise >= 200kb.

How to do such thing? Can any one help me? Please.

  • 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-15T04:34:37+00:00Added an answer on May 15, 2026 at 4:34 am

    Boost.Filesystem is a great library. Here is a code I wrote while ago, you can change the search criteria easily once you know the library(you can query the size and the extension):

    #include <iostream>
    #include <string>
    #include <vector>
    #include <boost/filesystem.hpp>
    
    using namespace std;
    using namespace boost::filesystem;
    
    void find_file(const path& root, const string& file_name, vector<path>& found_files)
    {
            directory_iterator current_file(root), end_file;
            bool found_file_in_dir = false;
            for( ; current_file != end_file; ++current_file)
            {
                    if( is_directory(current_file->status()) )
                            find_file(*current_file, file_name, found_files);
                    if( !found_file_in_dir && current_file->leaf() == file_name )
                    {
                            // Now we have found a file with the specified name,
                            // which means that there are no more files with the same
                            // name in the __same__ directory. What we have to do next,
                            // is to look for sub directories only, without checking other files.
                            found_files.push_back(*current_file);
                            found_file_in_dir = true;
                    }
            }
    }
    
    int main()
    {
            string file_name;
            string root_path;
            vector<path> found_files;
    
            std::cout << root_path;
            cout << "Please enter the name of the file to be found(with extension): ";
            cin >> file_name;
            cout << "Please enter the starting path of the search: ";
            cin >> root_path;
            cout << endl;
    
            find_file(root_path, file_name, found_files);
            for( std::size_t i = 0; i < found_files.size(); ++i)
                    cout << found_files[i] << endl;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Are there any high-level, cross-platform, and abstracted (simple to use) widget toolkits for C
Is there any native compression (for javascript/css files) available in ASP.NET?
Is there any way I can run class files (i.e. with main as the
Is there any real difference to screen reader users (or any users really) whether
Is there any crossplatform small\portable C image editing library?
Possible Duplicate: Cross Platform C library for GUI Apps? Is there any crossplatform GUI
Is there any serial port facilities in Qt ? If not, which crossplatform (desirable)
Is there any crossplatform way (Windows, Linux, MacOSX) to change screen resolution? Neither Java
are there any crossplatform tools for C++ which will help me to run child
Is there any cross platform way to find out which dir should be my

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.