Date range question

#1
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
 
#2
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.
 
#3
| 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
529
3
Groton, CT
#4
| 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]`
 
#5
| 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