home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 31
/
CDASC_31_1996_juillet_aout.iso
/
vrac
/
4dcat10.zip
/
SORTEM.BTM
< prev
Wrap
Text File
|
1996-03-07
|
1KB
|
44 lines
: The next two lines give the database format.
: ..|....1....|....2....|....3....|....4....|
: 7a arj.exe 122094 17-01-95 23:14
unset /q key1 key2 key3 /r ?
if %@index[%&,?] != -1 goto help
if %@index[%&,/r] != -1 set order=/r
if %1==n set key1=/6:8
if %1==s set key1=/19:7
if %1==t set key1=/35:2 /32:2 /29:2 /39:5
if %2==n set key2=/6:8
if %2==s set key2=/19:7
if %2==t set key2=/35:2 /32:2 /29:2 /39:5
if %3==n set key3=/6:8
if %3==s set key3=/19:7
if %3==t set key3=/35:2 /32:2 /29:2 /39:5
: The t sort key depends on the date format. European format (dd-mm-yy) is
: assumed here. Change key if other format is used.
: Explanation of the next line.
: Look in column 6 for a space: don't use these lines. (All filenames start in
: column 6.
: Look in column 8 for any character (including space): do use these lines.
: (Even the 'empty' lines have a CR/LF char in col 6/7)
: Look in column 20 for DIR: don't use these lines.
fgrep -sxvi6 ' ' database.txt|fgrep -sxi8 '?'|fgrep -sxvi20 'DIR'|rpsort/q %order %key1 %key2 %key3|list /s
quit
:help
echo.
echo %@filename[%0] sorts the files in the database. By Hans Tenkink
echo.
echo A sort key kan be added as a commandline parameter:
echo %@name[%0] n sorts on filenames.
echo %@name[%0] s sorts on filesize.
echo %@name[%0] t sorts on date and time.
echo a '/r' reverts the sort order.
echo.
echo Example: %@name[%0] t /r Gives the most recent files first.
echo.