Short: Powerful prg to rename/manipul filenames Author: parsec@aljan.com.au (Erik Spåre) Uploader: parsec@aljan.com.au (Erik Spåre) Version: 2.1 Type: util/cli Requires: OS 2.0 and above ********************************************************************** ** Case 2.1 - Filename Changer - by Erik Spåre (Parsec/Phuture 303) ** ** Filematching routines by Anders Vedmar (Axehandle/PC303) ** ********************************************************************** Very powerful program that lets you rename multiple files. Features: * Recursive pattern matching (no pattern targets all files in current dir) * More than 60 recognized extentions. * ENV:Caseopts file, where you can, for instance, add more extentions. * 5 Different lower/uppercase modes in many variants. * 8 extention operations (like add/remove/swap suffix/prefix/extention) * 11 string manipulation operations (like remove string, add head/tail) * Can handle *all* letters, not only a-z. * Direct or indirect renaming mode, won't crash on the ram-disk. * 100 percent 68000 assembler (I hope, have only tried it on my 060) * Freeware * And more... An example... Case -l -t -k -apmod Case -sp -w -ue MOD.OCEAN_LOADER_FIXED ==> mod.ocean_loader_fixed ==> Ocean_Loader_Fixed.MOD Mod.Green beret ==> mod.green_beret ==> Green_Beret.MOD mod.CRYSTAL HAMMER ==> mod.crystal_hammer ==> Crystal_Hammer.MOD DOC1 ==> mod.doc1 ==> Doc1.MOD Hunters_moon ==> mod.hunters_moon ==> Hunters_Moon.MOD MOD.SleepWalk ==> mod.sleepwalk ==> Sleepwalk.MOD MOD.(((nebulos))) ==> mod.nebulos ==> Nebulos.MOD mod.CREAM OF THE EARTH ==> mod.cream_of_the_earth ==> Cream_Of_The_Earth.MOD MOD.telephone!!! ==> mod.telephone ==> Telephone.MOD Here's a list of all the options... The caseing options -l All Lowercase -u All Uppercase -w Each new Word uppercase -f First letter uppercase -c Change cases -i Ignore suffix and/or prefix when caseing -I Don't Ignore suffix and/or prefix when caseing The extention operations -a Add specified prefix/suffix/extention -r Remove [specified] prefix/suffix/extention -C Change [given] pref/suff/ext to specified -s Swap prefix and/or suffix -E Ignore default extensions [only accept specified] -e Only accept default extentions [and specified] -L Set new prefix and/or suffix maxlength -g Give priority to prefix or suffix The string manipulation operations -t Transform spaces to underlines -T Transform underlines to spaces -d Delete all the spaces [or only specified] -D Delete specified strings -C Change string 1 to string 2 -k Keep letters, digits, some more [and specified] -K Keep A-Z, digits, some more [and specified] -m Mutilate chars with ASCI values exceeding 128 to 45-127 -a Add head/tail string to filename -r Remove head/tail string from filename -v Vomit files to PC-format The remaining options -D Disable env:caseopts file -q Be Quiet (only list errors) -n Neglect the directories -b Use a buffer when renaming (indirect) -B Don't use a buffer when renaming (direct) -S Simulate caseing, don't actually rename anything ALL To recurse into subdirs. Changes since version 2.0... ** Renamed almost all options, in a vain attempt to be more consequent, and make the names easier to remember. ** Prefix options that default to operating on extentions, but that can be made to operate on only prefixes/suffixes, now accept e (for both) as well as the usual p (prefixes only) and s (suffixes only) ** All specified extentions are now added to the list of recognized extentions. So if you want to remove the suffix .bla, you only need to write -rsbla, and don't worry about whether bla is a recognized suffix or not. ** Any given extention will adjust the extention maxlenght, if (and only if) it is exceeded. ** If a filepattern contains spaces, it now must have single or double quotes surrounding it. ** The delete chars functions are no longer case-sensitive. If you want to remove all ö:s, -dö will remove ö:s as well as Ö:s. ** It is now possible to specify characters to delete on several places, without having the previous chars forgotten. ** If an extention operation is selected, but no extention was modified, or even found, Case will now display a little reminder that maybe this was because you wanted to process files with alien extentions, and maybe you should try the -e option etc. This is so you won't think Case is flawed, like even I myself has thought several times! So easy to forget... ** Made an indirect mode to read all the filenames into a buffer, and then rename from that. Added the options -b and -B to select between direct and indirect mode. ** Added -ae, add specified extention. ** Added -r(h|t)<$>, remove head or tail string ** Added -C"<$>",<$> -- change string one to string two. ** Added -C<%>[<$>,]<$>, change extentions [from this] to that. ** Added -S, simulate caseing. ** Added a new caseing operation, -c, change all cases. ** Added -m, mutilate ASCII 128-255 into 45-127 ** The -v (vomit) option now turns on -m, and it will no longer remove the prefixes by default. You'll have to write -vp if you want those removed as well. ** The caseing operations (-l, -u, -c, -w, -f) will now operate on extentions only, if they are followed by p, s or e. ** A few minor bugs corrected ** More extentions are recognized... Remember: "This should be in every man's c-directory" /Axehandle. ============================= Archive contents ============================= Original Packed Ratio Date Time Name -------- ------- ----- --------- -------- ------------- 15740 7971 49.3% 21-Dec-97 01:05:08 +case 75693 21383 71.7% 21-Dec-97 01:04:48 +case.doc 80563 22831 71.6% 21-Dec-97 01:04:40 +case.guide -------- ------- ----- --------- -------- 171996 52185 69.6% 20-Dec-97 20:48:44 3 files