#!/usr/local/bin/kermit +
#
# d e l e t e
#
# This one barely qualifies as a script but it answers the Frequently
# Asked Question: "How do I delete files that are more than 5 days old?"
# /BEFORE is just one of many file-selection switches that can be used
# on DELETE, DIRECTORY, SEND, PURGE, and other file-related commands.
# Date switches such as /BEFORE: and /AFTER: can take not only absolute
# dates and/or times in various formats (such as "8-Feb-1999_10:28:30")
# but also relative ones like "-5Days", "+3months", etc.  Other file
# selection switches include /LARGER-THAN:size, /SMALLER-THAN:size,
# /EXCEPT:pattern, etc.
#
if > \v(argc) 2 {
    echo
    echo { Please quote wildcards on the command line.}
    echo { I need to expand wildcards myself.}
    echo
    exit 1
}
if not def \%1 { exit 1 delete what?}
delete /list /before:-5days \%1
exit \v(status)
