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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:29:06+00:00 2026-06-15T11:29:06+00:00

I have three files and three directories in a directory, with varying dates. $

  • 0

I have three files and three directories in a directory, with varying dates.

$ cd mydir
$ ls -ltr
-rw-rw-r-- 1 skiphoppy users    0 Nov 14 00:00 file.old.20121114
drwxrwxrwx 2 skiphoppy users 4096 Nov 14 00:00 dir.old.20121114
drwxrwxrwx 2 skiphoppy users 4096 Dec  5 12:05 dir.old.20121205
drwxrwxrwx 2 skiphoppy users 4096 Dec  5 12:05 dir
-rw-rw-r-- 1 skiphoppy users    0 Dec  5 12:16 file.old.20121205
-rw-rw-r-- 1 skiphoppy users    0 Dec  5 12:16 file

I want to build a dirset that includes all directories older than 2012-12-01. If I am reading right, the selector can be used to limit the files returned. But it appears this doesn’t work for a dirset, even though the dirset documentation says you can use nested patternsets and selectors.

If I use the date selector on a fileset, I get just the one old file that I would expect; but with the same syntax on a dirset, I get all directories:

<fileset id="old.files" dir="mydir">
  <date datetime="12/01/2012 12:00 AM" when="before"/>
</fileset>
<echo message="Files: ${toString:old.files}"/>
<dirset id="old.dirs" dir="mydir">
  <date datetime="12/01/2012 12:00 AM" when="before"/>
</dirset>
<echo message="Dirs: ${toString:old.dirs}"/>

Output:

 [echo] Files: file.old.20121114
 [echo] Dirs: ;dir;dir.old.20121114;dir.old.20121205

What is going on here that the date selector does not work?

  • 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-15T11:29:07+00:00Added an answer on June 15, 2026 at 11:29 am

    You probably need the checkdirs attribute set for the date selector. The default is ‘false’, i.e. select everything.

    <date datetime="12/01/2012 12:00 AM" when="before" checkdirs="true" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Util package with source files in three seperate directories, defined like
I have three files: movie.h (header); movie.cpp (implementation file); lab9.cpp (driver file using movie
I have three files, a main .cpp file: #include <stdio.h> #include myClass.h int main()
If I have three files index.php file.php and fns.php First example (it works): index.php
I have following files and directories in my project root directory main.py bar.py foo
I have a tree of directories with png files in each. From each directory
Here's what I'm trying to achieve. I have a directory with over 4200 sub-files/sub-directories,
I have 2 directories each with a .htaccess file: html/.htaccess - There is a
I have three files: lib.c lib.h => They should be built as a .so
I have three files: one called sql.php witch has a class db that I

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.