;
                                  REVFN.COM                                   

             Size (recs) CRC   Version    Author/Latest Issue      Disk
               3k (19)   6740  1.10       Gene Pizzetta 10/90      Z3COM18

  1- Syntax/Options  2- Usage  3- Errors  4- Configuration  5- Notes          


   REVFN reverses the case of a  filename,  making it  upper-case if is lower-
case and making it lower-case if it is upper-case.  Written primarily to allow
the renaming of lower-case disk labels  created by DSKNUM,  REVFN may  also be
useful to convert filenames inadvertently saved in lower-case by MBASIC.  File
attributes (R/O, SYS, ARC, etc.) are maintained.  For ZCPR3 only.
:1
 Syntax   REVFN {dir:}fn.ft {{/}options}

   If no DU or DIR is given, the current default drive/user is assumed.   If a 
filename begins with a slash, it must be preceded by a DU/DIR specification.

 Options 

   A leading slash is permissible, but not required.

     Q    Toggles current quiet mode setting.  Quiet mode is set
          by the ZCPR3 quiet flag or by a configuration option.
          The quiet flag is given priority, if it is set.  Option
          Q toggles the current mode.

     R    Toggles query for renaming of read-only files.
          Normally REVFN asks before renaming read-only files.
          This default can be changed by a configuration byte to
          rename such files without asking.  The R option will
          toggle the current default to non-default operation.
:2
 Usage - 1/2 

   Since lower-case filenames cannot be  handled by most utilities,  REVFN was
written to allow changing the filename to upper-case,  having our way with it,
and then changing it back to lower-case.   This  process can be automated with
ARUNZ aliases.   Below is an example alias that allows changing the label name
without having to enter the tag character (here assumed to be "#"), and having
to enter the disk number only once.  A brief usage message is displayed if you
enter DNAME alone, or with the standard "//" help request.

DNAME     if nu $1;
           or eq $1 //;
            echo USAGE:  DNAME %>{du:}oldname.num newname;
           else;
            /dname2 $*;
           fi;
          fi
 Usage - 2/2 

dname2    revfn $td1$tu1:#$tn1.$tt1 /r;
          rename $td1$tu1:#$tn1.$tt1 #$tn2.$tt1;
          revfn $td1$tu1:#$tn2.$tt1 /r

   If your disk labels are read-only,  this  alias  will  rename them  without
warning you first.

   The two  aliases  should be on  two lines,  of course,  and not spread over
several lines as done above for clarity.
:3
 Errors 

   If "//" or a null command tail is given,  REVFN will  display a brief usage
message.   All other errors will cause invocation of the error handler, if one
is installed.   In addition,  the program error flag will  be  set to standard
ZCPR 3.4 error codes:  2, invalid directory; 8, ambiguous or missing filename;
9,  bad numerical expression;  10,  source file not found;  11, disk full; 19,
invalid option; or 4, any other error.
:4
 Configuration 

   REVFN may be configured to default to quiet  mode and to  rename  read-only
files without asking, using ZCNFG and the configuration file, REVFNnn.CFG.  Do
not change the name of the CFG file or ZCNFG will not be able to find it auto-
matically, if you change the name of REVFN.
:5
 REVFN Notes 

   a. Vs 1.1 updates (October 8, 1990 -- Gene Pizzetta):
      - Corrected bug that required slash for options.   Now handles filenames
        beginning with slash properly, if preceded by a DU spec.
