date range documentation error

In the help for TCC date ranges it suggests:

To select files last modified n days ago or earlier, use /[d-n,1/1/80]. 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,1/1/80]

This does not work. I needed to use:

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

Logically you should specify that as:
dir /[1980/1/1,d-3]
or even better:
dir /[,d-3]
 
May 20, 2008
3,515
4
Elkridge, MD, USA
date range documenation error

| In the help for TCC date ranges it suggests:
|
| To select files last modified n days ago or earlier, use
| /[d-n,1/1/80]. 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,1/1/80]
|
| This does not work. I needed to use:
|
| dir /[d-3,1980/1/1]

All examples use the US as the default country format. If in Windows'
Regional Settings you selected a different format (mine is modified ISO,
i.e., I use period . as both date and time separator), that's the format
expected.


| Logically you should specify that as:
| dir /[1980/1/1,d-3]
| or even better:
| dir /[,d-3]

1/ The "[d" is the syntax for date range, it does not indicate anything
about whether or not the current date is relevant in the selection.
2/ It is explicitly stated that the order of dates is not significant,
i.e., the earlier date can be either the first parameter or the second
parameter, but if the first parameter is a relative date, it is relative to
today, while the second parameter, if it is a relative date and not an
absolute one is relative to the first date.
3/ There is the simplified "negated range" method: /![d-2] to list all
entries which are more than 2 days old (i.e., at least 3 days old).
--
HTH, Steve
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,447
88
Albuquerque, NM
prospero.unm.edu
In the help for TCC date ranges it suggests:

To select files last modified n days ago or earlier, use /[d-n,1/1/80]. 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,1/1/80]

This does not work. I needed to use:

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

If you use ISO8601 format, the range will work regardless of your locale settings:

Code:
dir /[d-3,1980-01-01]
Logically you should specify that as:
dir /[1980/1/1,d-3]
or even better:
dir /[,d-3]
It's not well documented, but you can in fact do:

Code:
dir /![d-3]
(Rex, both dateranges.htm and timeranges.htm allude to the possibility, but neither one includes an example. Without an example, it's not clear where the bang should go....)
 
Similar threads
Thread starter Title Forum Replies Date
C 7zip with date range .vs. filelist created with dir and daterange Support 0
Joe Caverly How to? Date Range in command line for 7zip /= Support 1
A How to? Create a date range based upon creation date Support 2
S Date range question Support 4
sully9 How to? Unexpected %DATE% CMD variable format (vs DATE /T format) in CMDebug Support 1
mfarah Fixed The DATE command produces the wrong error message. Support 1
T Date format date different from cmd Support 7
Jesse Heines How to? How to display picture creation date with dir command Support 6
Jesse Heines "Taken" date for JPG and PNG files Support 4
Joe Caverly DATE format 4 Support 7
fpefpe touch - date format Support 2
C How to? Add date/time to custom tpipe based BTM Support 1
vefatica Download center not up to date Support 4
N date and cmd compatibility Support 10
rps Functions @year[date] @isowyear[date] help Support 7
S Closing date for V16 suggestions Support 1
JohnQSmith DATE /T Support 13
S How to? Command dialogs vs. size/date/etc. exclusion ranges Support 1
M How to? Effectively "combine" date and time ranges... Support 2
CWBillow Make a folder named Date-Time Support 18
vefatica Do UNTIL DATETIME date time Support 6
Jay Sage Inconsistency in Date Formats Between @DATE and @MAKEDATE Support 3
dcantor More date-related help items for V11 Support 0
dcantor Help text for Date Formats Support 0
dcantor Suggestion for @DATE[] input Support 2
dcantor @DATE help example Support 0
CWBillow Date and Time in names Support 11
D Range command dialog with blank maximum size erases everything Support 5
C See if a file name matches extended range. Support 15
C Problem with /R description-range Support 5
vefatica Documentation Documentation of popup location and size Support 4
H Documentation @getdir documentation Support 0
G Documentation on TCMD.INI Support 9
D error in help documentation? Support 0
S PDF Documentation Availability Support 2
S How to? Upgrade Question: What supporting documentation is required at time of purchase? Support 2
M Documentation Q.Search doesn't support selection? Support 1
Joe Caverly Printing TPIPE documentation Support 3
dcantor Documentation Documentation error in UNSET Support 0
cgunhouse Documentation Foldmonitor vs Documentation Support 9
C VIEW PRINT - Documentation corrected - Font size Support 8
Dan Glynhampton Documentation v16 Documentation Support 0
Dan Glynhampton Documentation v16 Documentation comments Support 4
Dan Glynhampton Documentation Some v16 documentation comments Support 0
H Possible V16 documentation error? Support 2
dcantor Documentation TPIPE documentation Support 3
A minor documentation fix - command line editing Support 0
A del /w [minor documentation fix] Support 0
A Minor documentation fix ["-" on command line] Support 3
M How to? %_CMDLine not working the way I thought the documentation says it does... Support 3

Similar threads