Date ranges select files dated at any time of day between the inclusive limits specified. For example, /[d2011-12-1,2011-12-5] selects files that were last modified on or after December 1, 2011, but not modified after December 5, 2011.


When you use a date range in a command, only other range specifications may be between the command name and the date range. See General Rules for Using Ranges for additional details.


You can use hyphens, slashes, or periods to separate the month, day, and year. The year can be entered as a 2-digit or 4-digit value. Two-digit years between 80 and 99 are interpreted as 1980...1999; values between 00 and 79 are interpreted as 2000...2079. For example, /[d2010-12-31,2011-1-1] selects files modified  between December 31, 2010 and January 1, 2011.


If either parameter begins with a four digit year (which must greater than 1900), it is assumed to be a date in the international format yyyy-mm-dd, otherwise it is assumed that the date elements are in the order appropriate for your locale. All non-ISO date examples in the HELP use the USA format: mm-dd-yy, unless otherwise stated explicitly.


The default time for the first date is the beginning of that day, and for the second date it is the end of that day. This is true even if the dates are in descending order, i.e., the first date is later than the second one. You can alter these defaults by including specific start and stop times inside the date range. The time is separated from the date with an at sign @. For example, the range /[d2010-7-01@8:00a,2010-7-03@6:00p] selects files that were modified at any time between 8:00:00 am on July 1, 2010 and 6:00:00 pm on July 3, 2010. If you prefer, you can specify the times in 24-hour format (e.g., @18:00 for the end time in the previous example).


If you omit the second parameter in a date range, TCC-RT substitutes the current date and time. For example, /[d2010-10-1] selects files dated between October 1, 2010 and the instant of command execution.


Instead of an explicit date, you may use an offset value for either the beginning or ending date, or both. An offset begins with a plus sign [+] or a minus sign [-] followed by an integer. If you use an offset for the second value, it is calculated relative to the first. If you use an offset for the first (or only) value, the current date is used as the basis for calculation. For example:



Selects Files


modified between January 27, 2010 and January 30, 2010


modified between January 24, 2010 and January 27, 2010


modified today (from today minus zero days, to today)


modified yesterday or today (from today minus one day, to today)


modified yesterday (from today minus one day, to zero days after that)


As a shorthand way of specifying files modified today, you can also use /[d]; this has the same effect as the /[d-0] example shown above.


Instead of a date, you can specify a file age for the first and/or second parameter. See Time Stamps, @AGEDATE and @MAKEAGE.


To select files last modified n days ago or earlier, use /[d-n,1980-1-1]. For example, to get a directory of all files last modified 3 days or more before today (i.e., those files not modified within the last 3 days), you could use this command:


dir /[d-3,1980-1-1]


This reversed date range (with the later date given first) will be handled correctly by TCC-RT. It takes advantage of the facts that an offset in the start date is relative to today, and that the base or "zero" point for PC file dates is January 1, 1980 for FAT / VFAT, or January 1, 1601 for NTFS.


You cannot use offsets in the time portion of a date range (the part after an @ sign), but you can combine a time with a date offset. For example, /[d2010-12-08@12:00,+2@12:00] selects files that were last modified between noon on December 8 and noon on December 10, 2010. Similarly, /[d-2@15:00,+1] selects files last modified between 3:00 pm the day before yesterday and the end of the day one day after that, i.e., yesterday. The second time defaults to the end of the day because no time is specified.


You can exclude a date range by preceding the range with the ! character.




If the second date is the termination date, and it includes an explicit termination time, it is considered an exact value. For example, in the last example the termination time was 6PM. Files with a timestamp of 6:00:01 PM or later are not included in the date range. This is different from the behavior of time ranges.

If you include seconds in the times you specify, they will be silently ignored (no error or warning).

If the first date is later than the second, any time of day modifiers for the first date are silently ignored.


Date types and selection


Windows file systems keep track of three dates for a file: when it was created, when it was last modified (written), and when it was last accessed. You specify which date and time is used in a date range by adding a (access), c (creation), or w (write) after the d in the range. For example, to select all files created between February 1, 2010 and February 7, 2010, inclusive, you would use /[dc2010-02-1,2010-2-7]. If you don't specify which date and time to use, TCC-RT will use the date the file was last modified (written).


NOTE:  On FAT32 drives which support long filenames, only the last access date is recorded; the last access time is always returned as 00:00. However, on NTFS drives, last access information includes both date and time.


Date and time ranges may not always work as you expect across a network, including on FTP or HTTP servers, due to differences in time zone and file time storage method between the local and remote systems. Be sure to do some non-destructive testing before depending on date or time ranges to yield the results you want on a remote system.


Defaults for Date Ranges


Start date:


End date:


Time of first parameter:

Beginning of the day (00:00:00)

Time of second parameter:

End of the day (23:59:59)

Missing second parameter:

Current date and time

Date type

Modification (write)