1753529 Members
5005 Online
108795 Solutions
New Discussion юеВ

DIR/SINCE

 
SOLVED
Go to solution
Niall76
Frequent Advisor

DIR/SINCE

Hi,

I wanted to create a 'symbol' shortcut on my system called RECENT. I wanted RECENT to do a list on the directory of everything new in the last 5 minutes. Normally I have to SHOW TIME and do a DIR/SIN of the current time - 5 minutes. If possible, it would be great I if could do something like RECENT 5 for new items created in the last 5 minutes or RECENT 1 for items created in the last minute.
Any and all help is much appreciated.

Many thanks,
Niall
4 REPLIES 4
Oswald Knoppers_1
Valued Contributor
Solution

Re: DIR/SINCE

$ type sys$login:recent.com
$ tim=f$cvt("-0-0:''p1'","absolute")
$ dir/since="''tim'"

and make a symbol:

$ recent:==@sys$login:recent.com

Oswald
The Brit
Honored Contributor

Re: DIR/SINCE

Niall,

simpler to use a delta time in this instance.

$ recent :== Dir/since="-00:05"

you could add additional qualifiers, such as;

$ recent :== Dir/Mod/Sinc="-00:05"

to list files modified in the past 5 minutes.

Dave.
Jan van den Ende
Honored Contributor

Re: DIR/SINCE

Niall,

To extend on Dave:

>>>

$ recent :== Dir/since="-00:05"

you could add additional qualifiers, such as;

$ recent :== Dir/Mod/Sinc="-00:05"
<<<

Use his first assign of "recent" i.e.

$ recent :== Dir/since="-00:05"

And then use
$recent
or
$ recent /mod
or even
$ recent / backup
but also
$ recent /full

In other words, ANY qualifier which does not conflict with /since

... but I like Oswalds solution as well.
In my world I would extend it with the ability to handle more than 59 minutes, but that is not so hard to implement if wished for.

hth

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Robert Atkinson
Respected Contributor

Re: DIR/SINCE

Niall, you should also check out QDSB ( http://www.quadratrix.be/qdsb.html ) which allows you to run directory commands sorting the output by a number of options, including dates.

Rob.