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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:57:29+00:00 2026-06-13T00:57:29+00:00

I got a directory with the following structur. Name- -Year1 -Month1 -Day1 -file1 -..

  • 0

I got a directory with the following structur.

Name-
   -Year1
      -Month1
        -Day1
          -file1
        -..
      -...
   -Year2
      -Month1
      -...
   -...

Now i have 2 dates 2009-01-02 and 2010-02-03.

I want to ask if anyone knows how i can list all files which are in the folders in the given time, without building a giant if-else construct.
If possible without any other frameworks than Qt.

Any help would be greatly appreciated!

  • 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-06-13T00:57:30+00:00Added an answer on June 13, 2026 at 12:57 am

    Have a look at QDir::entryList(), which will list all the files in a folder. You can construct the directory path like so:

    QString path = QDir::currentPath() + "/" +
                   QString::fromNumber(year) + "/" +
                   QString::fromNumber(month) + "/" +
                   QString::fromNumber(day);
    

    and then do

    QDir dir(path);
    QStringList files = dir.entryList();
    

    You can do the same for the other date and then combine the two QStringLists.

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

Sidebar

Related Questions

Greetings, I've got a directory with a list of pdfs in it: file1.pdf, file2.pdf,
I've got a project in which I have a directory for each aspect of
I've got the following directory setup: http://www.mysite.com/public/ I'm using the following rewrite to remove
I have the following directory structure: APPDIR/ APPDIR/APPHDRS (has *.h) APPDIR/APPLIBSRCS (has *.cpp need
I've got the following directory-file structure; /index.php /head.inc (upper) /subdir/page.php /subdir/head.inc (lower) In /subdir/page.php
I have got the following code in a file called test.java which is located
I have a project which has the following directory structure. root --include ----module1 ----module2
This is a python newbie question: I have the following directory structure: test --
I have got the following problem since the server has safe mode turned on,
I got my Apache Mod_WSGI and Django working following http://blog.stannard.net.au/2010/12/11/installing-django-with-apache-and-mod_wsgi-on-ubuntu-10-04/ with a twist that

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.