Date range question

May 20, 2008
3,515
4
Elkridge, MD, USA
Help topic "dateranges.htm" includes the paragraph: "Instead of a date, you
can specify a file age for the first and/or second parameter (not supported
in TCC/LE). See Time Stamps, @AGEDATE and @MAKEAGE." No example is given.
Would the range
/[d%@fileage[%_cmdspec]]
correctly specify "same age or newer than the command processor"? Experiment
shows this to be true. How would I specify "newer than the specified file"
(i.e., exclude the specified file)?
--
Steve
 
May 20, 2008
603
0
Sammamish, WA
I would have thought that /[d%@inc[%@fileage[%_cmdspec]]] would do it,
but it doesn't seem to. Curious.

On Mon, Mar 8, 2010 at 11:28 AM, Steve Fábián <> wrote:


> Help topic "dateranges.htm" includes the paragraph: "Instead of a date, you
> can specify a file age for the first and/or second parameter (not supported
> in TCC/LE). See Time Stamps, @AGEDATE and @MAKEAGE." No example is given.
> Would the range
> /[d%@fileage[%_cmdspec]]
> correctly specify "same age or newer than the command processor"?
> Experiment
> shows this to be true. How would I specify "newer than the specified file"
> (i.e., exclude the specified file)?
> --
> Steve
>
>
>
>
>
>
>
>



--
Jim Cook
2010 Sundays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Monday.
 
May 20, 2008
3,515
4
Elkridge, MD, USA
| I would have thought that /[d%@inc[%@fileage[%_cmdspec]]] would
| do it, but it doesn't seem to. Curious.

That's because @inc added only 100 ns - way below the date range resolution.
Working on your idea, I found that /d%@eval[%@fileage[%_cmdspec]+7674676]]
included tcc.exe, but /[d%@eval[%@fileage[%_cmdspec]+7674677]] did not. The
fileage of tcc.exe on my system is 129123635112325323, so the limiting
worked when the age specified was the next second.
Just a little bit tricky. I just created a function:

function nxt=`%@eval[( %@fileage[%1] \ 10000000 + 1 ) * 10000000 ]`

which allows the desired operation:

/[d%nxt[%_cmdspec]]


Note that for FAT/FAT32/VFAT you may need to change the 1s = 10,000,000 *
100ns to 2s...
--
Steve
 
May 29, 2008
565
4
Groton, CT
| I would have thought that /[d%@inc[%@fileage[%_cmdspec]]] would
| do it, but it doesn't seem to. Curious.

That's because @inc added only 100 ns - way below the date range resolution.
Working on your idea, I found that /d%@eval[%@fileage[%_cmdspec]+7674676]]
included tcc.exe, but /[d%@eval[%@fileage[%_cmdspec]+7674677]] did not. The
fileage of tcc.exe on my system is 129123635112325323, so the limiting
worked when the age specified was the next second.
Just a little bit tricky. I just created a function:

function nxt=`%@eval[( %@fileage[%1] \ 10000000 + 1 ) * 10000000 ]`

which allows the desired operation:

/[d%nxt[%_cmdspec]]


Note that for FAT/FAT32/VFAT you may need to change the 1s = 10,000,000 *
100ns to 2s...
--
Steve


Since the least significant 7 digits seem to be irrelevant, you might simplify that to
Code:
function nxt=`%@eval[%@fileage[%1] + 10000000]`
 
May 20, 2008
3,515
4
Elkridge, MD, USA
| Since the least significant 7 digits seem to be irrelevant, you
| might simplify that to
|
| Code:
| ---------
| function nxt=`%@eval[%@fileage[%1] + 10000000]`
| ---------

Dave, based on your suggestion I made it even simpler, depending on the fact that the AGE is converted to a character string by the parser before it is used. The version below mostly just manipulates the strings:

Code:
---------
function nxt=`%@inc[%@left[-7,%@fileage[%1]]]0000000`
---------
--
Steve
 
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
Roedy date range documentation error Support 2
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
C forum Posting Question... Support 3
C question re: Move Support 3
S How to? Upgrade Question: What supporting documentation is required at time of purchase? Support 2
Peter Murschall Documentation Question to %@PSHELL Support 4
Fross Tab Question Support 6
Fross Quick Function Question Support 17
Dick Johnson Question about the Touch command Support 0
rps Documentation "Copy+Paste+run" question Support 2
vefatica SFTP question Support 17
vefatica Question about IPWorks Support 0
C How to? SHORTCUT question..... Support 6
vefatica TPIPE, crash and question Support 1
C Question / Suggestion Support 1
MickeyF Another TPIPE question Support 6
vefatica Another @EVERYTHING question Support 4
mikea How to? %@everything[] question Support 10
A License Question for Single User Support 5
Jay Sage Help Correction (and Related Question) Support 0
S Elapsed time in TCC prompt question Support 0
H command line parsing question Support 5

Similar threads