REVFN Version 1.1 Gene Pizzetta October 8, 1990 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. USAGE: 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 or 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. 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 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. 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. 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 automatically, if you change the name of REVFN. HISTORY: Version 1.1 -- 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. Version 1.0 -- September 23, 1990 -- Gene Pizzetta Initial release. Gene Pizzetta 481 Revere Street Revere, MA 02151 Newton Centre Z-Node: (617) 965-7259 GEnie: E.PIZZETTA Voice: (617) 284-0891