In Tacl, when listing the files in a subvol, how can I list the files in
descending date order
How do I list all files that have been modified after a given date
How do I list all files in alphabetical order
Well it's easy to list them alphabetically.....
Just use the FILEINFO command
To list files modified after a given date you could use:
fup info * where modtime > ddmmmyyyy
This command would return files that have their modified date greater than
the value specified by ddmmmyyyy
You could also use "=" and "<" operators.
I'm not sure about displaying files in descending date order though....there
might be a way....but I just don't know about it.
I would probably be best to do a FILEINFO to a variable or outfile and sort
that output on the timestamp column. There is an old ITUG utility called
DIR which I believe can do this. I haven't tried it in about 5 years but
the code is still at ITUG and could be easily modified for that type of
output.
--
Art Rice
Tandem Admin
Special Data Processing Corp
----------------------------
All opinions are my own and do not reflect
the views of the above mentioned employer.
SELECT FILE subvol.* FILENAME, MODTIME SORT DESC MODTIME
will display the names of the files and their modification times in descending order. You can also add other attributes to display or a WHERE clause, eg.
SELECT FILE subvol.* FILENAME, MODTIME SORT DESC MODTIME WHERE MODTIME > 2001-09-04
SELECT can also display information about processes and other things.
hope this helps,
Kari Kujansuu
Compaq Computer, Finland
?SECTION DIR^SORT ROUTINE
#FRAME
[#DEF dir^sort1 ROUTINE |BODY|
#PUSH ^filename ^filecount ^totfilesize
#SET ^filecount 0
#SET ^totfilesize 0
[#CASE [#ARGUMENT/VALUE ^filename/FILENAME /SYNTAX/ END]
|1|
#OUTPUT /COLUMN 4/ Volume is [#FILEINFO/VOLUME/ [^filename]]
#OUTPUT /COLUMN 4/ Directory of [#FILEINFO/SUBVOL/ [^filename]]
#OUTPUT
|2|
#OUTPUT
#OUTPUT File not found
#OUTPUT
#RETURN
]
#SETSCAN 0
[#LOOP
|DO|
[#CASE [#ARGUMENT/VALUE ^filename/FILENAME END]
|1|
#APPEND unsorted^flist [#FILEINFO /MODIFICATION, FULLNAME/ [^filename]]
|2|
#RETURN
]
|UNTIL| 0
]
]
[#DEF dir^sort2 ROUTINE |BODY|
#PUSH ^fname ^rubbish
#SETSCAN 0
[#LOOP
|DO|
#SETMANY ^rubbish ^fname , [#LINEGET sorted^flist 1 FOR 1]
DIR^DETAIL [^fname]
#SET ^filecount [#COMPUTE ^filecount + 1]
#SET ^totfilesize [#COMPUTE ^totfilesize + [#FILEINFO /EOF/ [^fname]]]
#LINEDEL sorted^flist 1 FOR 1
|UNTIL| [#EMPTYV sorted^flist]
]
#OUTPUT /WIDTH 16, JUSTIFY RIGHT, HOLD/ [^filecount] file(s)
#OUTPUT /WIDTH 17, JUSTIFY RIGHT/ [^totfilesize] bytes
]
SINK [#PURGE ZSORTIN]
SINK [#PURGE ZSORTOUT]
PUSH unsorted^flist sort^command sorted^flist throw^away
dir^sort1 [#FILENAMES [#REST]]
VARTOFILE unsorted^flist ZSORTIN
#APPEND sort^command ASC 1:16 INTEGER
#APPEND sort^command FROM ZSORTIN
#APPEND sort^command TO ZSORTOUT
#APPEND sort^command RUN
SORT /INV sort^command, OUTV throw^away/
FILETOVAR ZSORTOUT sorted^flist
dir^sort2
#UNFRAME
Thanks in advance,
JerryS
===========================
On Thu, 6 Sep 2001 23:51:20 +0100, "Jim Kelly"
<jimkel...@hotmail.com> wrote: