home *** CD-ROM | disk | FTP | other *** search
/ Dream 49 / Amiga_Dream_49.iso / amiga / workbench / commodoties / case.lha / Case / case.doc < prev    next >
Text File  |  1998-01-27  |  78KB  |  2,048 lines

  1.  
  2. *****************************************************************************
  3. ** Case 2.2 - Filename Changer - by Erik Spσre (Parsec/Phuture 303) 980127 **
  4. **        Filematching routines by Anders Vedmar (Axehandle/PC303)         **
  5. *****************************************************************************
  6.  
  7.     A POEM
  8.  
  9.         A good night.
  10.         A good night for nothing, indeed.
  11.         Tonight nothing will happen, here I can code alone, no one
  12.             will disturb me.
  13.         Here I can code in peace and await my own dear death.
  14.         Here I can sit and think of the world, as if I was a part of
  15.             it, as if I meant something to somebody else.
  16.         As if there was a meaning with this short and boring life.
  17.  
  18.         (Originally in Swedish by Gunnar Lundkvist. Slightly modified.)
  19.  
  20.  
  21.  
  22.     EXCITING BACKGROUND STORY
  23.  
  24.         One day, when I was removing all uppercases (by hand) from a
  25.         few hundred modules on my harddrive, I thought to myself
  26.         (constantly): "Why haven't someone made a utility for this?"
  27.  
  28.         I can't be the only person to dislike long lists of filenames,
  29.         some uppercase, some lowercase, and some a little of both.
  30.         I decided to do the world a favour, I started to code on
  31.         Case...
  32.  
  33.  
  34.  
  35.     WHAT CAN CASE DO FOR YOU?
  36.  
  37.         Compare these two lists...
  38.  
  39.             MOD.OCEAN_LOADER_FIXED        mod.ocean_loader_fixed
  40.             Mod.Green beret               mod.green_beret
  41.             mod.CRYSTAL HAMMER            mod.crystal_hammer
  42.             DOC1                          mod.doc1
  43.             Hunters_moon                  mod.hunters_moon
  44.             MOD.SleepWalk                 mod.sleepwalk
  45.             MOD.(((nebulos)))             mod.nebulos
  46.             mod.CREAM OF THE EARTH        mod.cream_of_the_earth
  47.             MOD.telephone!!!              mod.telephone
  48.  
  49.         If you prefer the left one, or don't care, then this is not a
  50.         utility for you. (Maybe you are one of those who chat with
  51.         capital letters...) You must be a little of a perfectionist,
  52.         or a design-freak, to understand why the left list is so
  53.         *revaulting*
  54.  
  55.         In this case I used the following options to produce the right
  56.         list:
  57.  
  58.             Case -l -t -k -apmod modules:old/#?
  59.  
  60.         -l to make all chars lowercase, -t to transform the spaces to
  61.         underlines, -k to keep only the letters and numbers (thus
  62.         removing '(' and '!') and -apmod to Add the Prefix mod (if it
  63.         isn't there already).
  64.  
  65.         If you can see my point, but don't like the right list either,
  66.         then don't worry -- there is probably one or more options that
  67.         is more suitable to your taste...
  68.  
  69.  
  70.  
  71.     REQUIREMENTS
  72.  
  73.         OS2.04 or above (because of the filematching routines).
  74.  
  75.  
  76.  
  77.     CASE IS...
  78.  
  79.         100 % assembler
  80.         Freeware
  81.  
  82.  
  83.  
  84.     REMEMBER...
  85.  
  86.         "This should be in every man's c-directory."
  87.          / Axehandle.
  88.  
  89.  
  90.  
  91.     MORE USEFUL INFORMATION ABOUT CASE
  92.  
  93.         Usage: Case -<OPTIONS> [<FILEPATTERN>] [ALL]
  94.  
  95.         The options you specify must all start with the minus sign.
  96.         If there is an argument given after the option there must be
  97.         NO spaces between them. If there's several strings that can
  98.         be given, use comma to separate them. Still no spaces.
  99.         Everything that is written after the last -option and before
  100.         the optional 'all' (to recurse) is assumed to be the filename/
  101.         filepattern. 
  102.  
  103.         If you don't write a file specification, #? (or *) will be
  104.         used.
  105.  
  106.         Recognized as lowercase letters (thus possible to uppercase):
  107.             abcdefghijklmnopqrstuvwxyzαßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷°∙·√ⁿ²
  108.  
  109.         Recognized as uppercase letters (and possible to lowercase):
  110.             ABCDEFGHIJKLMNOPQRSTUVWXYZ└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╪┘┌█▄▌
  111.  
  112.         And just recognized as a letter (not possible to lowercase):
  113.             ▀
  114.  
  115.  
  116.  
  117.     LIST OF OPTIONS
  118.  
  119.         Here are all the options. They are sorted in four categories.
  120.         They will be explained in detail later.
  121.  
  122.         The caseing options
  123.  
  124.            -l        All Lowercase
  125.            -u        All Uppercase
  126.            -c        Change cases
  127.            -w        Each new Word uppercase
  128.            -f        First letter uppercase
  129.            -i        Ignore suffix and/or prefix when caseing
  130.            -I        Don't Ignore suffix and/or prefix when caseing
  131.  
  132.         The extention operations
  133.  
  134.            -a        Add specified prefix/suffix/extention
  135.            -r        Remove [specified] prefix/suffix/extention
  136.            -C        Change [given] pref/suff/ext to specified
  137.            -s        Swap prefix and/or suffix
  138.            -E        Ignore default extensions [only accept specified]
  139.            -e        Only accept default extentions [and specified]
  140.            -L        Set new prefix and/or suffix maxlength
  141.            -g        Give priority to prefix or suffix
  142.  
  143.         The string manipulation operations
  144.  
  145.            -t        Transform spaces to underlines
  146.            -T        Transform underlines to spaces
  147.            -d        Delete all the spaces [or only specified]
  148.            -D        Delete specified strings
  149.            -C        Change string 1 to string 2
  150.            -k        Keep letters, digits, some more [and specified]
  151.            -K        Keep A-Z, digits, some more [and specified]
  152.            -m        Mutilate chars with ASCI values exceeding 128 to 45-127
  153.            -a        Add head/tail string to filename
  154.            -r        Remove head/tail string from filename
  155.            -v        Vomit files to PC-format
  156.  
  157.         The remaining options
  158.  
  159.            -D        Disable env:caseopts file
  160.            -q        Be Quiet (only list errors)
  161.            -n        Neglect the directories
  162.            -b        Use a buffer when renaming (indirect)
  163.            -B        Don't use a buffer when renaming (direct)
  164.            -S        Simulate caseing, don't actually rename anything
  165.            ALL       To recurse into subdirs.
  166.  
  167.         As a rule, if an option can be either on or off, the negative
  168.         form will be an uppercased letter, and the positive a lowercased.
  169.  
  170.  
  171.  
  172.     HOW CASE WORKS, ORDER OF EXECUTION...
  173.  
  174.         If Case is in indirect mode (which it is unless you use the -B
  175.         option) all matching files will be read to a buffer. If it is in
  176.         indirect mode, one matching file at a time will be cased.
  177.  
  178.             First the -C" option will be called. (Change strings)
  179.  
  180.             Then the -m option (mutilate).
  181.  
  182.         At this point, all found extentions will be stripped from the
  183.         filename, if this has not been disabled somehow. Most of the options
  184.         will not be given a chance to operate on the extentions from now on,
  185.         unless, of course, the option is only intended for extentions.
  186.  
  187.             The -l/u/f/w/c options are called. These may or may not affect
  188.             the extentions, depending on the settings. Note that the extention
  189.             specific variants of these options are not executed now.
  190.  
  191.             The -d option (delete spaces and/or specified chars)
  192.  
  193.             The -D option (delete strings).
  194.  
  195.             Next out is the -k (keep only letters and specified) or -K option
  196.             (keep only a-z and specified); only one of these can be called
  197.             per session, for obvious reasons...
  198.  
  199.         Now the filetype will be checked: is it a file or a directory?
  200.         If it's a directory, the following options will be skipped...
  201.  
  202.             The -C<%> option (change extention)
  203.  
  204.             The -r option (remove extention or head/tail string). Note that
  205.             this means that head/tail strings cannot be removed from
  206.             directory names.
  207.  
  208.             The -a option (add extention or head/tail string). Again, this
  209.             means that head/tail strings cannot be added to directory names.
  210.  
  211.             The -s option (swap prefix and/or suffix)
  212.  
  213.             And finally the extention specific variants of the -l/u/f/w/c
  214.             options are called.
  215.  
  216.         Now when the extention-specific operations have been performed there's
  217.         only one more operation left to do on both files and directories.
  218.  
  219.             It's the -v option (vomit files to PC format). Note that most of
  220.             what this option does has already been done, since it turns on a
  221.             bunch of other options. The only thing it does now is to truncate
  222.             the name and/or any recognized extentions.
  223.  
  224.         Finally all the extentions and head/tail strings are merged into one
  225.         single name. First I copy any found/added prefix, then add a header
  226.         string if that was desired (so no other options have actually a
  227.         chance to affect the header string you specified). Directly after
  228.         this the possibly modified filename, followed by a tailstring (same
  229.         thing with this) and the suffix.
  230.  
  231.         If the resulting filename differs from the source filename, the file
  232.         is renamed unless it's too long.
  233.  
  234.  
  235.  
  236.     THE ENV:CASEOPTS FILE
  237.  
  238.         Before Case starts to interprete the commandline, it will try
  239.         to load env:caseopts. If this file is found its contents are
  240.         interpreted just as the argument-line's are.
  241.  
  242.  
  243.  
  244.     RECOGNIZED EXTENTIONS
  245.  
  246.         Graphics extentions
  247.  
  248.             qt
  249.             avi, brs, iff, gif, jpg, mpg, raw
  250.             anim, ilbm, jpeg
  251.  
  252.         Music extentions
  253.  
  254.             xm
  255.             med, mod, mp3, p61, s3m
  256.             symmod
  257.  
  258.         Archive-related extentions
  259.  
  260.             gz, pp
  261.             arc, arj, bz2, dms, lha, lzx, tar, xpk, zip, zoo, tgz, lzh
  262.             gzip
  263.  
  264.         Programming-related extentions
  265.  
  266.             c, E, i, o, s
  267.             asm, c++, cpp, obj
  268.             rexx
  269.  
  270.         Text-related extentions
  271.  
  272.             pi
  273.             bbs, diz, doc, htm, lst, man, nfo, tex, txt
  274.             html, text
  275.             amiga, guide
  276.             readme
  277.             displayme
  278.  
  279.         Misc extentions
  280.  
  281.             bin, dat, env, exe
  282.             info
  283.             prefs
  284.  
  285.         I couldn't think of any more... If you miss one, then
  286.         complain to me and/or add it in the env:caseopts file
  287.         with -e<extention>.
  288.  
  289.  
  290.  
  291.     SYMBOLS USED IN THE SYNTAX
  292.         
  293.         []      Everything within brackets are optional.
  294.         (h|t)   Write either 'h' (for header string) or 't' (for
  295.                 tail string).
  296.         <%>     Short form for (s|p|e) (or (S|P|E), it doesn't matter), an
  297.                 extention specification. Use 's' (suffix), 'p' (prefix) or
  298.                 'e' for both.
  299.         <c>     Means a character. For example 'p' or '!'
  300.         <c>..   Means one or more characters, a = 'a' or abc = 'a','b','c'
  301.         <$>     Means a string. You usually don't have to enclose a string
  302.                 with single or double quotes, but sometimes it's a must.
  303.                 If you start it with a double quote, you must end it with
  304.                 a double quote. Same thing with single quotes.
  305.                 Valid strings: ab (ab), "1,3" (1,3), '# %' (# %),
  306.                 "'o'" ('o'), '/"\' (/"\), rab" (rab")
  307.                 Invalid strings: "hm'  'bla   oof,   """   '"'"'
  308.         <$>,..  Means that you must specify one or more strings, separated
  309.                 by commas. This is ok: "rab",'oof' and Case would
  310.                 interpretate it as the two strings rab and oof.
  311.         <#>     Denotes ONE digit, 1-9.
  312.  
  313.         I call a prefix something that precedes the filename with a dot,
  314.         for instance mod.#?
  315.         I call a suffix something that follows the filename with a dot,
  316.         for instance #?.txt
  317.         When I say extention I mean either a prefix or a suffix.
  318.  
  319.  
  320.  
  321. **********************************************************************
  322. **                        THE CASING OPTIONS                        **
  323. **                       (l, u, c, w, f, i, I)                      **
  324. **********************************************************************
  325.  
  326. -l  NAME        All lowercase
  327.  
  328.     SYNTAX      -l[<%>]
  329.  
  330.     ARGUMENTS   Give an extention specification if you only want
  331.                 this operation to affect prefixes and/or suffixes.
  332.  
  333.     TASK        Lowercase all the characters in a filename and/or
  334.                 its extentions.
  335.  
  336.     FUNCTION    All the names that match will be lowercased, including
  337.                 their prefixes and suffixes. If you don't want the
  338.                 extensions to be affected by this operation, use the
  339.                 -i option.
  340.  
  341.     AFFECTS     u, w, f, c, I, i
  342.  
  343.                 u   (All uppercase) -- Turned off
  344.                 w   (Each new word uppercase) -- Turned off
  345.                 f   (First letter uppercase) -- Turned off
  346.                 c   (Change cases) -- Turned off
  347.                 i(*)(Ignore suffix and/or prefix when caseing) -- turned off.
  348.                     Use this in conjunction with the -l option to
  349.                     perform the operation on the filename only.
  350.                 I(*)(Don't Ignore suffix and/or prefix when caseing) -- on.
  351.                     This is so that the extentions won't be stripped off
  352.                     the filename, before the caseing starts (as they
  353.                     are when the -w and -f options are executed).
  354.  
  355.                 (*) The -I and -i options are not touched when this mode
  356.                     is started as an extention operation only.
  357.  
  358.     EXAMPLE 1   Case   -l "mOd.DeT_VAR_en.PP"
  359.                 Target     ^^^^^^^^^^^^^^^^
  360.                 Result    "mod.det_var_en.pp"
  361.  
  362.     EXAMPLE 2   Case   -le "mOd.DeT_VAR_en.PP"
  363.                 Target      ^^^            ^^
  364.                 Result     "mod.DeT_VAR_en.pp"
  365.  
  366.  
  367.  
  368. -u  NAME        All uppercase
  369.  
  370.     SYNTAX      -u[<%>]
  371.  
  372.     ARGUMENTS   Give an extention specification if you only want
  373.                 this operation to affect prefixes and/or suffixes.
  374.  
  375.     TASK        Uppercase all the characters in a filename and/or
  376.                 its extentions.
  377.  
  378.     FUNCTION    All the names that match will be uppercased, including
  379.                 their prefixes and suffixes. If you don't want the
  380.                 extensions to be affected by this operation, use the
  381.                 -i option.
  382.  
  383.     AFFECTS     u, w, f, c, I, i
  384.  
  385.                 u   (All uppercase) -- Turned off
  386.                 w   (Each new word uppercase) -- Turned off
  387.                 f   (First letter uppercase) -- Turned off
  388.                 c   (Change cases) -- Turned off
  389.                 i(*)(Ignore suffix and/or prefix when caseing) -- turned off.
  390.                     Use this in conjunction with the -u option to
  391.                     perform the operation on the filename only.
  392.                 I(*)(Don't Ignore suffix and/or prefix when caseing) -- on.
  393.                     This is so that the extentions won't be stripped off
  394.                     the filename, before the caseing starts (As they
  395.                     are when the -w and -f options are executed).
  396.  
  397.                 (*) The -I and -i options are not touched when this mode
  398.                     is started as an extention operation.
  399.  
  400.     EXAMPLE 1   Case   -u "mOd.Ensam_GNU.pp"
  401.                 Target     ^^^^^^^^^^^^^^^^
  402.                 Result    "MOD.ENSAM_GNU.PP"
  403.                          
  404.     EXAMPLE 2   Case  -up "mOd.Ensam_GNU.pp"
  405.                 Target     ^^^
  406.                 Result    "MOD.Ensam_GNU.pp"
  407.  
  408.  
  409.  
  410. -c  NAME        Change cases
  411.  
  412.     SYNTAX      -c[<%>]
  413.  
  414.     ARGUMENTS   Give an extention specification if you only want
  415.                 this operation to affect prefixes and/or suffixes.
  416.  
  417.     TASK        Change cases on the characters in a filename and/or
  418.                 its extentions.
  419.  
  420.     FUNCTION    All the names that match will change cases, including
  421.                 the prefixes and suffixes. If you don't want the
  422.                 extensions to be affected by this operation, use the
  423.                 -i option.
  424.  
  425.     AFFECTS     l, u, w, f, I, i
  426.  
  427.                 l   (All lowercase) -- Turned off
  428.                 u   (All uppercase) -- Turned off
  429.                 w   (Each new word uppercase) -- Turned off
  430.                 f   (First letter uppercase) -- Turned off
  431.                 i(*)(Ignore suffix and/or prefix when caseing) -- turned off.
  432.                     Use this in conjunction with the -c option to
  433.                     perform the operation on the filename only.
  434.                 I(*)(Don't Ignore suffix and/or prefix when caseing) -- on.
  435.                     This is so that the extentions won't be stripped off
  436.                     the filename, before the caseing starts (As they
  437.                     are when the -w and -f options are executed).
  438.  
  439.                 (*) The -I and -i options are not touched when this mode
  440.                     is started as an extention operation.
  441.  
  442.     EXAMPLE 1   Case   -c "mOd.Ensam_GNU.pp"
  443.                 Target     ^^^^^^^^^^^^^^^^
  444.                 Result    "MoD.eNSAM_gnu.PP"
  445.                          
  446.     EXAMPLE 2   Case  -ce "mOd.Ensam_GNU.pp"
  447.                 Target     ^^^           ^^
  448.                 Result    "MoD.Ensam_GNU.PP"
  449.  
  450.  
  451.  
  452. -w  NAME        Each new word uppercase
  453.  
  454.     SYNTAX      -w[<%>]
  455.  
  456.     ARGUMENTS   Give an extention specification if you only want
  457.                 this operation to affect prefixes and/or suffixes.
  458.  
  459.     TASK        Uppercase the first letter in the filename's (and/or its
  460.                 extentions) every word, lowercase the rest. 
  461.  
  462.     FUNCTION    Every matching file will be stripped from its
  463.                 extensions, the remaining part will then be cased. The
  464.                 first letter in every word will be uppercased, all the
  465.                 other lowercased. New words are distinguished by a
  466.                 non-letter e.g a space, underscore, digit, questionmark
  467.                 etc (Characters not in the "recognized letters" list).
  468.                 The extentions are by default not affected.
  469.  
  470.     AFFECTS     l, u, f, c, i, I
  471.  
  472.                 l   (All lowercase) -- Turned off
  473.                 u   (All uppercase) -- Turned off
  474.                 f   (First letter uppercase) -- Turned off
  475.                 c   (Change cases) -- Turned off
  476.                 i(*)(Ignore suffix and/or prefix when caseing)  -- Turned on.
  477.                     This is so that the extentions will be stripped
  478.                     from the filename (when they are not ignored they
  479.                     remain with it), before the caseing starts. It
  480.                     looks (in my opinion) ugly when the extentions
  481.                     are treated as a word, and cased...
  482.                 I(*)(Don't Ignore suffix and/or prefix when caseing) -- off.
  483.                     The extentions are by default not included in
  484.                     the -w casing; if you want them to be, use this
  485.                     option.
  486.  
  487.                 (*) The -I and -i options are not touched when this mode
  488.                     is started as an extention operation.
  489.  
  490.     EXAMPLE 1   Case   -w "mod.lo!in_this222i am.pp"
  491.                 Target         ^^^^^^^^^^^^^^^^^
  492.                 Result    "mod.Lo!In_This222I Am.pp"
  493.  
  494.     EXAMPLE 2   Case  -ws "mod.lo!in_this222i am.pP"
  495.                 Target                           ^^
  496.                 Result    "mod.lo!in_this222i am.Pp"
  497.  
  498.  
  499.  
  500. -f  NAME        First letter uppercase
  501.  
  502.     SYNTAX      -f[<%>]
  503.  
  504.     ARGUMENTS   Give an extention specification if you only want
  505.                 this operation to affect prefixes and/or suffixes.
  506.  
  507.     TASK        Uppercase the first found letter in the filename (and/or
  508.                 its extentions), lowercase the rest.
  509.  
  510.     FUNCTION    Every matching file will be stripped from its
  511.                 extensions, the remaning part will then be cased. The
  512.                 first letter found will be uppercased, all the other
  513.                 lowercased. The extentions are by default not
  514.                 affected.
  515.  
  516.     AFFECTS     l, u, w, c, i, I
  517.  
  518.                 l   (All lowercase) -- Turned off
  519.                 u   (All uppercase) -- Turned off
  520.                 w   (Each new word uppercase) -- Turned off
  521.                 c   (Change cases) -- Turned off
  522.                 i(*)(Ignore suffix and/or prefix when caseing)  -- Turned on.
  523.                     This is so that the extentions will be stripped
  524.                     from the filename (when they are not ignored they
  525.                     remain with it), before the caseing starts. It
  526.                     looks (in my opinion) ugly when the extentions
  527.                     are treated as a word, and cased...
  528.                 I(*)(Don't Ignore suffix and/or prefix when caseing) -- off.
  529.                     The extentions are by default not included in
  530.                     the -w casing; if you want them to be, use this
  531.                     option.
  532.  
  533.                 (*) The -I and -i options are not touched when this mode
  534.                     is started as an extention operation.
  535.  
  536.     EXAMPLE 1   Case   -f "mod.lO!In_This222I Am.pp"
  537.                 Target         ^^^^^^^^^^^^^^^^^
  538.                 Result    "mod.Lo!in_this222i am.pp"
  539.  
  540.     EXAMPLE 2   Case  -fp "mOd.lO!In_This222I Am.pp"
  541.                 Target     ^^^
  542.                 Result    "Mod.lO!In_This222I Am.pp"
  543.  
  544.  
  545.  
  546. -i  NAME        Ignore suffix and/or prefix when caseing
  547.  
  548.     SYNTAX      -i[<%>]
  549.  
  550.     ARGUMENTS   s   Ignore suffixes only.
  551.                 p   Ignore prefixes only.
  552.                 e   or -i alone ignores both the suffixes and prefixes.
  553.  
  554.     TASK        To tell the -l/u/c options what to operate on.
  555.  
  556.     FUNCTION    The -i option is _only_ useful in conjunction with the
  557.                 -l/u/c options. When you use -i it will force the casing
  558.                 operations to operate on only the filename (and one
  559.                 extention, if requested). If you don't like the
  560.                 default fact that the -l/u/c options case the whole
  561.                 filenames, with extentions, use -i.
  562.  
  563.     AFFECTS     l, u, c, I
  564.                 l   (All lowercase) -- Will cause the -l casing to be
  565.                     conducted on only the filename (and possibly one
  566.                     extention).
  567.                 u   (All uppercase) -- As above.
  568.                 c   (Change cases) -- As above.
  569.                 I   (Don't ignore suffix and/or prefix) -- Turned off.
  570.  
  571.     EXAMPLE 1   Case -i -l  "MOD.INTO_PERSONA1.PP"
  572.                 Target           ^^^^^^^^^^^^^
  573.                 Result      "MOD.into_persona1.PP"
  574.  
  575.     EXAMPLE 2   Case -ip -l "MOD.INTO_PERSONA1.PP"
  576.                 Target           ^^^^^^^^^^^^^^^^
  577.                 Result      "MOD.into_persona1.pp"
  578.  
  579.     EXAMPLE 3   Case -is -u "mod.into_persona1.pp"
  580.                 Target       ^^^^^^^^^^^^^^^^^
  581.                 Result      "MOD.INTO_PERSONA1.pp"
  582.  
  583.  
  584.  
  585. -I  NAME        Don't ignore suffix and/or prefix when caseing
  586.  
  587.     SYNTAX      -I[<%>]
  588.  
  589.     ARGUMENTS   s   Don't ignore suffixes.
  590.                 p   Don't ignore prefixes.
  591.                 e   or -I alone will make sure that neither suffix nor
  592.                     prefix will be ignored.
  593.  
  594.     TASK        To tell the -f/w options what to operate on.
  595.  
  596.     FUNCTION    The -I option is, _only_ useful in conjunction with the -w/f
  597.                 options. When you use -I it will force the casing operations to
  598.                 operate on the filename, the prefix (-I, -IE or -IP) and/or
  599.                 the suffix (-I, -IE or -IS). If you don't like the default
  600.                 values of the w/f options, use -I.
  601.  
  602.     AFFECTS     w, f, i
  603.                 w   (Each new word uppercase) -- The extentions will
  604.                     be treated just as the filename, and the caseing
  605.                     thus conducted on the whole (or part of the whole,
  606.                     depending on the -I setting).
  607.                 f   (First letter uppercase) -- As above.
  608.                 i   (Ignore suffix and/or prefix) -- Turned off.
  609.  
  610.     EXAMPLE 1   Case -IE -w "MOD.TEARS_OF_THE_FOREST.PP"
  611.                 Target       ^^^^^^^^^^^^^^^^^^^^^^^^^^
  612.                 Result      "Mod.Tears_Of_The_Forest.Pp"
  613.  
  614.     EXAMPLE 2   Case -Ip -f "MOD.TEARS_OF_THE_FOREST.PP"
  615.                 Target       ^^^^^^^^^^^^^^^^^^^^^^^
  616.                 Result      "Mod.tears_of_the_forest.PP"
  617.  
  618.     EXAMPLE 3   Case -Is -w "MOD.TEARS_OF_THE_FOREST.PP"
  619.                 Target           ^^^^^^^^^^^^^^^^^^^^^^
  620.                 Result      "MOD.Tears_Of_The_Forest.Pp"
  621.  
  622.  
  623.  
  624. **********************************************************************
  625. **                     THE EXTENTION OPERATIONS                     **
  626. **                     (a, r, C, s, E, e, L, g)                     **
  627. **********************************************************************
  628.  
  629. -a  NAME        Add specified prefix/suffix/extention
  630.  
  631.     SYNTAX      -a<%><$>
  632.  
  633.     ARGUMENTS   p   Add prefix
  634.                 s   Add suffix
  635.                 e   Add extention
  636.                 <$> Directly after the -a<%> (no space) is the name of
  637.                     the prefix/suffix/extention to add.
  638.  
  639.     TASK        To add an extention to the filename
  640.  
  641.     FUNCTION    The extention will be added to a name, if it does not
  642.                 exist already. If it does exist, but not exactly as
  643.                 specified, the extention name will be adjusted. Meaning,
  644.                 if you add `mod' and a name contains the prefix `MOD'
  645.                 it is renamed to the desired `mod'.
  646.  
  647.     NOTE        The specified extention will be added to the list of
  648.                 recognized extentions. If you use this option with -E it
  649.                 will not be recognized.
  650.  
  651.     AFFECTS     L   (Set new prefix and/or suffix maxlength) -- The
  652.                     extention options will change the maximum allowed
  653.                     length of an extention _if_ a specified one's
  654.                     length exceeds the current maxlength. Remember
  655.                     that the -L option is only used when the -e
  656.                     option is turned off (which it isn't unless you
  657.                     disable it by -E)
  658.                     
  659.     EXAMPLES    Case -apmod "mahlzeit"       => "mod.mahlzeit"
  660.                 Case -apmOd "mod.mahlzeit"   => "mOd.mahlzeit"
  661.                 Case -apmod "npu.mahlzeit"   => "mod.npu.mahlzeit"
  662.                 Case -apmod "mod.mahlzeit"   => [NO CHANGE]
  663.                 Case -aetxt "wonderland"     => "txt.wonderland.txt"
  664.                 Case -asTxT "wonderland.txt" => "wonderland.TxT"
  665.                 Case -aspp  "wonderland.txt" => "wonderland.txt.pp"
  666.                 Case -astxt "wonderland.txt" => [NO CHANGE]
  667.  
  668.  
  669.  
  670. -r  NAME        Remove [specified] prefix/suffix/extention
  671.  
  672.     SYNTAX      -r<%>[<$>]
  673.  
  674.     ARGUMENTS   p   Add prefix
  675.                 s   Add suffix
  676.                 e   Add extention
  677.                 <$> Directly after the -r<%> (no space) you can specify
  678.                     the name of the extention to remove.
  679.  
  680.     TASK        To remove an extention from the filename.
  681.  
  682.     FUNCTION    If no extention is specified, all (recognized) extentions
  683.                 will be removed. If you want to remove all extentions,
  684.                 regardless whether this program recognize them or not
  685.                 (like "prc.mymodule"), then you better use the -E
  686.                 option. (You may need the -L option as well). If you
  687.                 specify an extention, only files containing that extention
  688.                 will have it removed (the check is not case-sensitive).
  689.                 
  690.     NOTE        If you specify an extention it will be added to the list of
  691.                 recognized extentions. If you use this option with -E it
  692.                 will not be recognized.
  693.  
  694.     AFFECTS     L   (Set new prefix and/or suffix maxlength) -- The
  695.                     extention options will change the maximum allowed
  696.                     length of an extention _if_ a specified one's
  697.                     length exceeds the current maxlength. Remember
  698.                     that the -L option is only used when the -e
  699.                     option is turned off (which it isn't unless you
  700.                     disable it by -E)
  701.                     
  702.     EXAMPLES    Case -rpMOD "mod.mahlzeit"      => "mahlzeit"
  703.                 Case -rpmed "mod.mahlzeit"      => [NO CHANGE]
  704.                 Case -rp    "med.mahlzeit.lzx"  => "mahlzeit.lzx"
  705.                 Case -re    "med.mahlzeit.lzx"  => "mahlzeit"
  706.                 Case -rsTXT "wonderland.txt"    => "wonderland"
  707.                 Case -rstxt "wonderland.txt.pp" => [NO CHANGE]
  708.                 Case -rs    "wonderland.txt.pp" => "wonderland.txt"
  709.  
  710.  
  711.  
  712. -C  NAME        Change [given] pref/suff/ext to specified
  713.  
  714.     SYNTAX      -C<%>[<$>,]<$>
  715.  
  716.     ARGUMENTS   p   Change only prefixes
  717.                 s   Change only suffixes
  718.                 e   Change all extentions
  719.                 <$> If only one extention is given, it is assumed to be the
  720.                     target. If two are given, the first one is the source.
  721.  
  722.     TASK        To change extentions' names
  723.  
  724.     FUNCTION    If no source is specified: All recognized extentions will be
  725.                 changed to the destination.
  726.                 If a source is specified: Only the extentions that match the
  727.                 source (the first given extention) will be changed to the
  728.                 destination.
  729.  
  730.     NOTE        Any specified extentions will be added to the list of
  731.                 recognized extentions. If you use this option with -E they
  732.                 will not be recognized.
  733.  
  734.     AFFECTS     L   (Set new prefix and/or suffix maxlength) -- The
  735.                     extention options will change the maximum allowed
  736.                     length of an extention _if_ a specified one's
  737.                     length exceeds the current maxlength. Remember
  738.                     that the -L option is only used when the -e
  739.                     option is turned off (which it isn't unless you
  740.                     disable it by -E)
  741.  
  742.     EXAMPLES    Case -Cpmed,mod   med.hummeln2.pp => mod.hummeln2.pp
  743.                 Case -CsPP,mod    med.hummeln2.pp => mod.hummeln2.mod
  744.                 Case -CpPP,mod    med.hummeln2.pp => [NO CHANGE]
  745.                 Case -Cemod       med.hummeln2.pp => mod.hummeln2.mod
  746.  
  747.  
  748.  
  749. -s  NAME        Swap prefix and/or suffix
  750.  
  751.     SYNTAX      -s[<%>]
  752.  
  753.     ARGUMENTS   p   Swap prefixes to suffixes.
  754.                 s   Swap suffixes to prefixes.
  755.                 e   or -s alone swaps both the suffix and prefix.
  756.  
  757.     TASK        To swap the extentions' positions.
  758.  
  759.     FUNCTION    Unless selected otherwise (with p or s) the recognized
  760.                 prefixes will be changed to suffixes and vice versa.
  761.  
  762.     AFFECTS     None
  763.  
  764.     EXAMPLES    Case -s  "pp.remix101.lfo.mod" => "mod.remix101.lfo.pp"
  765.                 Case -sp "pp.remix101.lfo.mod" => "remix101.lfo.mod.pp"
  766.                 Case -ss "pp.remix101.lfo.mod" => "mod.pp.remix101.lfo"
  767.  
  768.  
  769.  
  770. -E  NAME        Ignore default extensions [only accept specified]
  771.  
  772.     SYNTAX      -E[<$>,..]
  773.  
  774.     ARGUMENTS   <$> Directly after the -E it is possible to specify
  775.                     one or more extentions that will be the _only_
  776.                     recognized extentions.
  777.  
  778.     TASK        Change the criteria for extention recognition, forget
  779.                 the default extentions.
  780.  
  781.     FUNCTION    If no argument is given then Case will ignore its
  782.                 internal list of valid extentions and treat all 1-3
  783.                 letter strings (or more if specified) that is
  784.                 separated from the filename with "." as extentions.
  785.                 If one or more extention is specified after the -E,
  786.                 then _only_ those will be recognized.
  787.                 
  788.     AFFECTS     -e (Only accept default extentions) -- Turned off.
  789.  
  790.     EXAMPLE 1   Case -re "mod.remix101.lfo" => "remix101.lfo"
  791.                 Remove extentions. Only mod is recognized as an
  792.                 extention, and properly removed.
  793.  
  794.     EXAMPLE 2   Case -re -E "mod.remix101.lfo" => "remix101"
  795.                 Now both mod and lfo are recognized as extentions, and
  796.                 removed.
  797.  
  798.     EXAMPLE 3   Case -re -Elfo "mod.remix101.lfo" => "mod.remix101"
  799.                 This tells Case that the only valid extention is lfo,
  800.                 and as such it is removed.
  801.  
  802.  
  803.  
  804. -e  NAME        Only accept default extentions [and specified]
  805.  
  806.     SYNTAX      -e[<$>,..]
  807.  
  808.     ARGUMENTS   <$> Directly after the -e it is possible to specify
  809.                     one or more additional extentions to recognize.
  810.  
  811.     TASK        Change the criteria for extention recognition, always
  812.                 recognize the default extentions.
  813.  
  814.     FUNCTION    -e is used by default, so there is no point in
  815.                 writing it, unless -E is present in env:caseopts.
  816.                 It does not disable previous -e adds.
  817.                 All extentions specified after the -e is added to the
  818.                 list of recognized extentions. It is possible to
  819.                 add extentions with -e both in env:caseopts and the
  820.                 argument line.
  821.                 
  822.     AFFECTS     -E (Ignore default extensions) -- Turned off.
  823.  
  824.     EXAMPLE 1   Case -re "mod.remix101.lfo" => "remix101.lfo"
  825.                 Remove extentions. Only mod is recognized as an
  826.                 extention, and properly removed.
  827.  
  828.     EXAMPLE 2   Case -re -eprc,lfo "mod.remix101.lfo" => "remix101"
  829.                 Now both mod and lfo are recognized as extentions, and
  830.                 removed. The fictive extention prc would also have
  831.                 been removed if it had been found.
  832.  
  833.     EXAMPLE 3   Case -re -elfo "pco.remix101.lfo" => "pco.remix101"
  834.                 The suffix lfo is recognized and removed, the alien
  835.                 prefix pco is ignored.
  836.  
  837.  
  838.  
  839. -L  NAME        Set new prefix and/or suffix maxlength
  840.  
  841.     SYNTAX      -L[<%>]<#>
  842.  
  843.     ARGUMENTS   p   Only change the prefix maxlength.
  844.                 s   Only change the suffix maxlength.
  845.                 e   or -L<#> alone changes both the suffix & prefix maxlength.
  846.                 <#> A number between 1 and 9; the new maxlength.
  847.  
  848.     TASK        Change the criteria for extention recognition (if -E
  849.                 is used).
  850.  
  851.     FUNCTION    This is an option that will probably never be used by
  852.                 anyone. Nevertheless, this is what it does: First, it
  853.                 is _only_ consulted if the -E (ignore default
  854.                 extentions) mode is on. If it is, all 1-3 letter
  855.                 strings enclosing the filename with "." will be
  856.                 treated as extentions. The 3 letter limit (default)
  857.                 makes the recognition more safe. However, in some
  858.                 cases you may want to change the length, so that, for
  859.                 instance, strange 4-letter suffixes (not normally
  860.                 recognized by Case) can be removed or whatever. In
  861.                 Case 1.0 you needed to use this option if you removed
  862.                 specified 4-9 letters extentions, but lo! That is not
  863.                 necessary anymore. (The maxlength is now adjusted after
  864.                 the longest specified extention. Could that be a
  865.                 nuisance sometimes? I don't know, but if so, use
  866.                 -L after the extentions).
  867.  
  868.     AFFECTS     None
  869.  
  870.     EXAMPLE 1   Case -re -E -L4 "this.orthis" => "orthis"
  871.                 Remove extentions, ignore default extentions.
  872.                 `this' is 4 chars, and is treated as a prefix and
  873.                 properly removed.
  874.  
  875.     EXAMPLE 2   Case -re -E -L2 "mod.raveland.pp" => "mod.raveland"
  876.                 As example 1, but now the maximum allowed extention
  877.                 length is only 2 letters, so the prefix mod is
  878.                 ignored.
  879.  
  880.     EXAMPLE 3   Case -re -E -Lp6 "parsec.aha.parsec" => "aha.parsec"
  881.                 The prefixes are now allowed to be upto 6 letters,
  882.                 but not the suffixes, which are left untouched.
  883.  
  884.  
  885.  
  886. -g  NAME        Give priority to Prefix or Suffix
  887.  
  888.     SYNTAX      -g(p|s)
  889.  
  890.     ARGUMENTS   p   Give priority to the prefixes
  891.                 s   Give priority to the suffixes
  892.  
  893.     TASK        Tell what extention that has "the last word".
  894.  
  895.     FUNCTION    Sometimes a filename containing only one point (.) may
  896.                 nevertheless present two valid extentions. For
  897.                 instance a file called mod.txt would confuse Case, a
  898.                 little. Luckily it checks what extention that has the
  899.                 priority, and gives it authority to do whatever it
  900.                 pleases. By default the suffixes has the priority,
  901.                 because they are more common than the prefixes.
  902.                 However, the priority is changed each time you specify
  903.                 a suffix/prefix operation; for instance, if you tell
  904.                 Case to remove all prefixes, the priority will be
  905.                 given to them. Same with E, L, r, a... They give
  906.                 the priority to their own target. If you specify
  907.                 several of these, the last written is the last to
  908.                 change the priority. This is not the case with -g
  909.                 though, no matter where you write it, it will always
  910.                 give the priority you command. 
  911.  
  912.     AFFECTS     None
  913.  
  914.     EXAMPLE 1   Case -rp -rs "mod.pp" => "mod"
  915.                 The -rs is written last, the priority is given to the
  916.                 suffixes.
  917.  
  918.     EXAMPLE 2   Case -rs -rp "mod.pp" => "pp"
  919.                 Now the -rp was written last. Priority to the prefixes.
  920.  
  921.     EXAMPLE 3   Case -gs -rs -rp "mod.pp" => "mod"
  922.                 The -gs overrides the last priority change and the
  923.                 priority is given to the suffixes.
  924.  
  925.  
  926.  
  927. **********************************************************************
  928. **                THE STRING MANIPULATION OPERATIONS                **
  929. **                 (t, T, d, D, C, k, K, m, a, r, v)                **
  930. **********************************************************************
  931.  
  932. -t  NAME        Transform spaces to underlines
  933.  
  934.     SYNTAX      -t
  935.  
  936.     ARGUMENTS   None
  937.  
  938.     TASK        To connect words separated by spaces
  939.  
  940.     FUNCTION    All spaces in the filenames (recognized extentions not
  941.                 affected) will be transformed to underlines (_).
  942.  
  943.     AFFECTS     -T (Transform underlines to spaces) -- Turned off.
  944.  
  945.     EXAMPLE     Case -t "mod.one two  three" => "mod.one_two__three"
  946.  
  947.  
  948.  
  949. -T  NAME        Transform underlines to spaces
  950.  
  951.     SYNTAX      -T
  952.  
  953.     ARGUMENTS   None
  954.  
  955.     TASK        To replace underlines (_) by spaces.
  956.  
  957.     FUNCTION    All underlines in the filenames (recognized extentions
  958.                 not affected) will be transformed to spaces.
  959.  
  960.     AFFECTS     -t (Transform spaces to underlines) -- Turned off.
  961.  
  962.     EXAMPLE     Case -T "mod.one_two__three" => "mod.one two  three"
  963.  
  964.  
  965.  
  966. -d  NAME        Delete all the spaces [or only specified]
  967.  
  968.     SYNTAX      -d[<c>..]
  969.  
  970.     ARGUMENTS   <c> If you specify one or more characters, directly after the
  971.                     -d (no spaces), only these characters will be deleted.
  972.  
  973.     TASK        To compress several words into one, or strip ugly characters
  974.                 from the filenames.
  975.  
  976.     FUNCTION    If you write -d alone, all spaces in the filenames (recognized
  977.                 extentions not affected) will be deleted. If you specify one or
  978.                 more characters after the -d, _only_ those will be deleted.
  979.                 Spaces will in that case not be removed. If you want to delete
  980.                 both $ and spaces, you have to write -d -d$.
  981.  
  982.     NOTE        Characters written in one or more previous -r:s will be
  983.                 remembered.
  984.  
  985.     AFFECTS     None
  986.  
  987.     EXAMPLES    Case -d   "mod.one two  three" => "mod.onetwothree"
  988.                 Case -d() "mod.(((nebulos)))"  => "mod.nebulos"
  989.  
  990.  
  991.  
  992. -D  NAME        Delete specified string[s]
  993.  
  994.     SYNTAX      -D<$>,..
  995.  
  996.     ARGUMENTS   <$> The unwanted string or strings. If you specify several
  997.                     strings, separate them with commas (no spaces!). If you
  998.                     want to include a comma or space, enclose the string with
  999.                     single (') or double (") quoutes. If you want to remove
  1000.                     a string that begins with a single quoute, you must
  1001.                     enclose the whole string with double quoutes. Likewise, if
  1002.                     you want to remove a string that begins with a " you must
  1003.                     enclose the whole string with single quotes.
  1004.  
  1005.     TASK        To remove ugly/unwanted strings from the filenames.
  1006.  
  1007.     FUNCTION    The specified string(s) are removed from the filenames.
  1008.                 The search is not case-sensitive.
  1009.  
  1010.     NOTE        Strings written in a previous -D will _not_ be
  1011.                 remembered. In other words, it is not possible to
  1012.                 "add" more strings to remove.
  1013.  
  1014.     AFFECTS     None
  1015.  
  1016.     EXAMPLE     Case -D[lfo]     "mod.[LFO]delta_rave" => "mod.delta_rave"
  1017.                 Case -D"don't ",bla "mod.don't saybla" => "mod.say"
  1018.  
  1019.  
  1020.  
  1021. -C  NAME        Change string one to string two
  1022.  
  1023.     SYNTAX      -C"<$>",<$>
  1024.  
  1025.     ARGUMENTS   "<$>" The first string is the "source", the string you want
  1026.                       to change. You MUST place the _first_ string within single
  1027.                       or double quoutes, to separate it from the -C<%><$>[,<$>]
  1028.                       option.
  1029.                 <$>   The second string is the "destination", what you want the
  1030.                       first string to be. Does not have to be quoted.
  1031.  
  1032.     TASK        To change one string into another.
  1033.  
  1034.     FUNCTION    Before any extentions are stripped from the filename, it will
  1035.                 be checked for matches of the given source string
  1036.                 (case-insensitive). If found, the following will happen:
  1037.                 If the source string is of the same length as the dest string
  1038.                 and the found string doesn't match the destination string
  1039.                 exactly (only case insensitive), it is replaced. If the source
  1040.                 string's length differ from the destinations string's, a
  1041.                 replacement always takes place. And the caseing goes on...
  1042.  
  1043.     NOTE #1     This function does not care about extentions, it will conduct
  1044.                 it's search on the whole filename.
  1045.  
  1046.     NOTE #2     You can only have one string substitution per session. If you
  1047.                 specify several, only the last will be given a chance.
  1048.  
  1049.     AFFECTS     None
  1050.  
  1051.     EXAMPLES    Case -C"don't",do "I don't want to live" => "I do want to live"
  1052.                 Case -C"bla.med",mod "bla.med.oofrab"    => "mod.oofrab"
  1053.  
  1054.  
  1055.  
  1056. -k  NAME        Keep letters, digits [and specified]
  1057.  
  1058.     SYNTAX      -k[<c>..]
  1059.  
  1060.     ARGUMENTS   <c> Additional char -- or chars -- to keep.
  1061.  
  1062.     TASK        Keep only letters & numbers, thus removing ugly chars.
  1063.  
  1064.     FUNCTION    This option will strip eccentric characters from your
  1065.                 filenames. It will only keep letters, numbers, dots,
  1066.                 underlines, spaces and all the characters you specify
  1067.                 directly after the -k.
  1068.  
  1069.     NOTE        All characters written earlier (whether it's on the k
  1070.                 or K) will _not_ be remembered. In other words, it's not
  1071.                 possible to "add" more characters to keep.
  1072.  
  1073.     AFFECTS     -K (Keep A-Z, digits [and specified]) -- Turned off.
  1074.  
  1075.     EXAMPLE     Case -k$! "«╪⌐! Par$ec-222_ah!" => "╪! Par$ec222_ah!"
  1076.  
  1077.  
  1078.  
  1079. -K  NAME        Keep A-Z, digits [and specified]
  1080.  
  1081.     SYNTAX      -K[<c>..]
  1082.  
  1083.     ARGUMENTS   <c> Additional char -- or chars -- to keep.
  1084.  
  1085.     TASK        Keep only A-Z & numbers, thus removing ugly chars.
  1086.  
  1087.     FUNCTION    This option will strip eccentric characters from your
  1088.                 filenames. It will only keep the letters A-Z (unlike
  1089.                 its sister-option -k), numbers, underlines, spaces, dots
  1090.                 and all the characters you specify directly after the -K.
  1091.  
  1092.     NOTE        All characters written earlier (whether it's on the k
  1093.                 or K) will _not_ be remembered. In other words, it's not
  1094.                 possible to "add" more chars to keep.
  1095.  
  1096.     AFFECTS     -k (Keep letters, digits [& specified]) -- Turned off.
  1097.  
  1098.     EXAMPLE     Case -K$! "µ«╪! Par$ec-222_ah!" => "! Par$ec222_ah!"
  1099.  
  1100.  
  1101.  
  1102. -m  NAME        Mutilate chars with ASCI value exceeding 128 to 0-127
  1103.  
  1104.     SYNTAX      -m
  1105.  
  1106.     ARGUMENTS   None
  1107.  
  1108.     TASK        Convert phonems and such to their stem-letters
  1109.  
  1110.     FUNCTION    Since ASCII values of 128-255 are not an international
  1111.                 standard, filenames containing that may come to look strange
  1112.                 on another OS. This option will try to "make the best of it",
  1113.                 so for instance σ will become a, ╓ => O, Θ => e etc. All
  1114.                 non-letters will become a dash (-).
  1115.  
  1116.     NOTE #1     -m, -n and -S are currently the _only_ options that turn on
  1117.                 themselves by inverting the current value (by default
  1118.                 zero=NOP). This means that if you write -m -m it will be
  1119.                 turned on and then immediately disabled. This is only useful
  1120.                 if you have the -m written in the env:caseopts file,
  1121.                 and then temporarily want to rename some directories.
  1122.  
  1123.     NOTE #2     This option is performed on the whole filename, including
  1124.                 extentions.
  1125.  
  1126.     AFFECTS     None
  1127.  
  1128.     EXAMPLE     Case -m "tΣnd pσ!" => "tand pa!"
  1129.  
  1130.  
  1131.  
  1132. -a  NAME        Add head or tail string to filename
  1133.  
  1134.     SYNTAX      -a(h|t)<$>
  1135.  
  1136.     ARGUMENTS   h   Add a header string
  1137.                 t   Add a tail string
  1138.                 <$> String to add
  1139.  
  1140.     TASK        To add a string to start or end of the filename.
  1141.  
  1142.     FUNCTION    This option is actually very useful -- not only when
  1143.                 you are adding your handle to a group of files, but
  1144.                 when you want to lengthen a filename for some (very
  1145.                 common) reason. I use this a lot. The header is not
  1146.                 placed before any (recognized) prefix, and the tail
  1147.                 not after any suffix. The string to insert is not
  1148.                 inserted if it is already there. This works the same
  1149.                 way as the prefix/suffix adds in that the check is not
  1150.                 case-sensitive; if the string match case-insensitive,
  1151.                 but not case-sensitive, it is not added, but adjusted.
  1152.  
  1153.     NOTE        You can only add one header, and only one tail per
  1154.                 session. It is not possible to add tails or headers to
  1155.                 directories.
  1156.  
  1157.     AFFECTS     None
  1158.  
  1159.     EXAMPLES    Case -ah[LFO] "mod.jungle"      => "mod.[LFO]jungle"
  1160.                 Case -ah[lfo] "mod.[LFO]jungle" => "mod.[lfo]jungle"
  1161.                 Case -ah[lfo] "mod.[lfo]jungle" => [NO CHANGE]
  1162.  
  1163.  
  1164.  
  1165. -r  NAME        Remove head/tail string from filename
  1166.  
  1167.     SYNTAX      -r(h|t)<$>
  1168.  
  1169.     ARGUMENTS   h   Remove a header string
  1170.                 t   Remove a tail string
  1171.                 <$> String to remove
  1172.  
  1173.     TASK        To remove a string from the beginning or end of the filename.
  1174.  
  1175.     FUNCTION    This works exactly as the delete string function, except
  1176.                 that Case will only check the tail or end of the filename
  1177.                 (with extentions stripped) for matches (case insensitive).
  1178.                 This function is mostly implemented so that you can "undo" a
  1179.                 previous add head/tail call.
  1180.  
  1181.     NOTE        You can only remove one header, and only one tail per
  1182.                 session. It is not possible to remove tails or headers
  1183.                 from directories.
  1184.  
  1185.     AFFECTS     None
  1186.  
  1187.     EXAMPLES    Case -rh<LFO> "mod.<LFO>jungle" => "mod.jungle"
  1188.                 Case -rh<lfo> "mod.<LFO>jungle" => "mod.jungle"
  1189.                 Case -rh<lfo> "bla.<LFO>jungle" => [NO CHANGE]
  1190.                                (bla is not recognized as a prefix)
  1191.                 Case -rh<lfo> -E "bla.<LFO>jungle" => "bla.jungle"
  1192.                                (using the -E option, it is)
  1193.  
  1194.  
  1195.  
  1196. -v  NAME        Vomit files to PC-format                                       
  1197.  
  1198.     SYNTAX      -v[<%>]
  1199.  
  1200.     ARGUMENTS   p   Remove the prefixes
  1201.                 s   Remove the suffixes
  1202.                 e   Remove both prefixes and suffixes
  1203.                 -   Only -v keeps the extentions.
  1204.  
  1205.     TASK        Truncate Amiga-filenames to PC-format, 8+3 letters.
  1206.  
  1207.     FUNCTION    If you write -vp, the prefixes will be removed, and the
  1208.                 (recognized) suffixes truncated to 3 letters. The
  1209.                 filename without extentions will be stripped so that
  1210.                 only letters and numbers remain, and then truncated
  1211.                 (if necessary) so that the length does not exceed 8
  1212.                 bytes. All characters are uppercased.
  1213.  
  1214.     NOTE        Beware (if you run this twice on the same file/s) of
  1215.                 truncated extentions, getting suddenly unknown, and
  1216.                 thus inevitably removed...
  1217.                 Beware also of the -k option's zealous work... If a
  1218.                 suffix is not known, then the -k will remove the dot.
  1219.                 A good idea might be to use the -E option...
  1220.  
  1221.     AFFECTS     re/k/u/f/c/w/l
  1222.                 rp  (Remove prefix) Turned on if you specify -vp or -ve
  1223.                 rs  (Remove suffix) Turned on if you specify -vs or -ve
  1224.                 m   (Mutilate asci 128+) Turned on. Write -m AFTER the
  1225.                     -v[<%>] to turn it off again.
  1226.                 k   Turned on with the task to remove _everything_ but
  1227.                     letters and numbers (so it differs a bit from the
  1228.                     normal -k option).
  1229.                 u   (All Uppercase) -- Turned on
  1230.                 l   (All lowercase) -- Turned off
  1231.                 c   (Change cases)  -- Turned off
  1232.                 w   (Each new word uppercase) -- Turned off
  1233.                 f   (First letter uppercase) -- Turned off
  1234.                 
  1235.     EXAMPLES    Case -v  mod.+1_psychedelic!.guide => MOD.1PSYCHED.GUI
  1236.                 Case -vs mod.+1_psychedelic!.guide => MOD.1PSYCHED
  1237.                 Case -vp mod.+1_psychedelic!.guide => 1PSYCHED.GUI
  1238.                 Case -ve mod.+1_psychedelic!.guide => 1PSYCHED
  1239.  
  1240.  
  1241.  
  1242. **********************************************************************
  1243. **                      THE REMAINING OPTIONS                       **
  1244. **                     (D, q, n, b, B, S, ALL)                      **
  1245. **********************************************************************
  1246.  
  1247. -D  NAME        Disable env:caseopts file
  1248.  
  1249.     SYNTAX      -D
  1250.  
  1251.     ARGUMENTS   None
  1252.  
  1253.     TASK        To ignore the file env:caseopts
  1254.  
  1255.     FUNCTION    The file env:caseopts will, if you specify this
  1256.                 (anywhere on the argument line), not be loaded. The -D
  1257.                 may also be present in the env:caseopts file itself,
  1258.                 which will then be ignored, even though it has been
  1259.                 loaded.
  1260.  
  1261.     AFFECTS     None
  1262.  
  1263.     EXAMPLE     Env:caseopts = "-l"
  1264.                 Case -Pmod    "ARNESUNE" => "mod.arnesune"
  1265.                 Case -Pmod -D "ARNESUNE" => "mod.ARNESUNE"
  1266.  
  1267.  
  1268.  
  1269. -q  NAME        Be Quiet (only list errors)
  1270.  
  1271.     SYNTAX      -q
  1272.  
  1273.     ARGUMENTS   None
  1274.  
  1275.     TASK        To skip the rename listing.
  1276.  
  1277.     FUNCTION    The Case banner and result line will be displayed as
  1278.                 usual. Nothing else, unless an error occurs.
  1279.  
  1280.     AFFECTS     None
  1281.  
  1282.  
  1283.  
  1284. -n  NAME        Neglect the directories
  1285.  
  1286.     SYNTAX      -n
  1287.  
  1288.     ARGUMENTS   None
  1289.  
  1290.     TASK        To completely ignore all directories.
  1291.  
  1292.     FUNCTION    The filematching routine will be told to skip all
  1293.                 directories.
  1294.  
  1295.     NOTE        -n, -m and -S are currently the _only_ options that turn on
  1296.                 themselves by inverting the current value (by default
  1297.                 zero=NOP). This means that if you write -n -n it will be
  1298.                 turned on and then immediately disabled. This is only useful
  1299.                 if you have the -n written in the env:caseopts file,
  1300.                 and then temporarily want to rename some directories.
  1301.  
  1302.     AFFECTS     None
  1303.  
  1304.  
  1305.  
  1306. -b  NAME        Use a buffer when renaming (indirect)
  1307.  
  1308.     SYNTAX      -b
  1309.  
  1310.     ARGUMENTS   None
  1311.  
  1312.     TASK        To read in all the matching files before renaming.
  1313.  
  1314.     FUNCTION    This is on by default, because if it isn't, many operations
  1315.                 on the ram-disk will fail or even crash (due to a flaw in
  1316.                 the OS) and this would scare my users into abandoning Case,
  1317.                 thinking it is clustered with bugs ;)
  1318.                 If the memory for the buffers, holding all the filenames found
  1319.                 so far, should run out, use the -B option. You may want to use
  1320.                 the -B option anyway, so you won't have to experience that
  1321.                 annoying pause in the beginning, initiated when many files are
  1322.                 to be renamed... (See notes about the ram-disk for more info).
  1323.  
  1324.     AFFECTS     -B  Turned off.
  1325.  
  1326.  
  1327.  
  1328. -B  NAME        Don't use a buffer when renaming (direct)
  1329.  
  1330.     SYNTAX      -B
  1331.  
  1332.     ARGUMENTS   None
  1333.  
  1334.     TASK        To rename one file at a time
  1335.  
  1336.     FUNCTION    This is off by default, because if it wasn't, many operations
  1337.                 on the ram-disk would fail or even crash (due to a flaw in
  1338.                 the OS). If you use this switch, you'll reduce memory
  1339.                 fragmentation and usage (though this only goes for big sessions,
  1340.                 lowercaseing a whole partiton for instance). Case will ask
  1341.                 AxeMatch for the next matching file, process it and call AxeMatch
  1342.                 again, until there are no more files. (See notes about the
  1343.                 ram-disk for more info).
  1344.  
  1345.     AFFECTS     -b  Turned off.
  1346.  
  1347.  
  1348.  
  1349. -S  NAME        Simulate caseing, don't rename anything
  1350.  
  1351.     SYNTAX      -S
  1352.  
  1353.     ARGUMENTS   None
  1354.  
  1355.     TASK        To show the user what will happen before it happens.
  1356.  
  1357.     FUNCTION    Everything will go on as usual, except that no files will
  1358.                 be renamed. You'll see the results exactly as you'd see if
  1359.                 you had actually been renaming them. The only exception is
  1360.                 that all possible errors won't be caught. If Case would
  1361.                 strip the number from bla1.txt, renaming it to bla.txt, and
  1362.                 the next file was bla2.txt, it wouldn't be possible to rename
  1363.                 bla2.txt to bla.txt, since it already existed. When simulating
  1364.                 caseing this would not be noticed.
  1365.  
  1366.     NOTE        -S, -m and -n are currently the _only_ options that turn on
  1367.                 themselves by inverting the current value (by default
  1368.                 zero=NOP). This means that if you write -S -S it will be
  1369.                 turned on and then immediately disabled. This is only useful
  1370.                 if you have the -S written in the env:caseopts file, (as if
  1371.                 this was some kind of toy!) and then temporarily want to
  1372.                 actually rename some files...
  1373.  
  1374.     AFFECTS     None
  1375.  
  1376.  
  1377.  
  1378. ALL NAME        Recurse into subdirectories,
  1379.  
  1380.     SYNTAX      ALL
  1381.  
  1382.     ARGUMENTS   None
  1383.  
  1384.     TASK        To recurse into all subdirs.
  1385.  
  1386.     FUNCTION    By default Case will only process the file or directory
  1387.                 that you specify after the options. If you wish to make
  1388.                 Case recurse into all subdirs (and their subdirs..),
  1389.                 write ALL after the options (and filepattern if any).
  1390.                 It might seem stupid to use -options all the time, except
  1391.                 for this, but I'm so used of using ALL that I made it this
  1392.                 way.
  1393.  
  1394.     AFFECTS     None
  1395.  
  1396.  
  1397.  
  1398. **********************************************************************
  1399. **                        Similar programs                          **
  1400. **    (Short descriptions, where to get them, my impressions etc)   **
  1401. **********************************************************************
  1402.  
  1403. To find out how well my program could compete with other programs I
  1404. took a look at Aminet and found a bunch of renaming utilities...
  1405.  
  1406.     NAME        FixName V1.20beta
  1407.  
  1408.     AUTHOR      Mikael Nordlund
  1409.  
  1410.     RELEASED    930120
  1411.  
  1412.     LOCATION    util/cli/FixName120.lha
  1413.  
  1414.     SIZE        6 KB
  1415.  
  1416.     SHORT       Capitalize first char on filenames in dir[...]
  1417.  
  1418.     COMMENTS    I hadn't seen this almost 5 year old program before.  Very
  1419.                 impressive!  Can recurse into subdirs, have the equivalent
  1420.                 of Case's -u -l -f and -w.  And it even has the option to
  1421.                 open up a small GUI where you can do exactly the same as in
  1422.                 shell, plus save a configuration file.  But it has no
  1423.                 pattern-matching, can only ucase/lcase a-z, plus I'd say
  1424.                 development has ceased :) Freeware.
  1425.  
  1426.  
  1427.  
  1428.     NAME        Arud Converter v2.2
  1429.  
  1430.     AUTHOR      Morten Amundsen
  1431.  
  1432.     RELEASED    93xxxx - 9510xx
  1433.  
  1434.     LOCATION    util/misc/arud220.lha
  1435.  
  1436.     SIZE        29 KB
  1437.  
  1438.     SHORT       Rename multiple files w/src (anims etc)
  1439.  
  1440.     COMMENTS    This program has a nice GUI for renumbering (and copying if
  1441.                 selected) large amount of files, all sharing the same
  1442.                 basename.  The range can be selected and the basename
  1443.                 changed.  Does not recurse into subdirs.  Postcardware,
  1444.                 asm-source included.
  1445.  
  1446.  
  1447.  
  1448.     NAME        LookName 2.2
  1449.  
  1450.     AUTHOR      Philippe Muhlheim
  1451.  
  1452.     RELEASED    940908 - 951023.
  1453.  
  1454.     LOCATION    util/cli/LookName22.lha
  1455.  
  1456.     SIZE        10 KB
  1457.  
  1458.     SHORT       Make filenames lowercase or uppercase and[...]
  1459.  
  1460.     COMMENTS    This is what I wrote about Lookname in Case2.0's doc:
  1461.                 Since the last release I have seen some Case-like programs,
  1462.                 but only one is worth mentioning:  LookName v2.2 by Philippe
  1463.                 Muhlheim.  He released his first Case-clone a year before I
  1464.                 even got the idea.  I give lots of thanks to Philippe for
  1465.                 inspiration and ideas (like the -v option).  LookName works
  1466.                 on all OS, it seems, and has some options that this program
  1467.                 does not (like the possibility to flummy/deflummy filenames,
  1468.                 like "cool" = "τ°°1" and such).  But it gives me the
  1469.                 impression of being a program to toy with, rather than to
  1470.                 aide, and it lacks a lot of useful things (v2.2) like the
  1471.                 remove string function, pattern matching, and the mandatory
  1472.                 ALL to recurse.  Also it may CRASH when encountering the
  1473.                 ram-bug (see notes about the ram-disk), at least it did for
  1474.                 me the first time I tried it, not knowing my program
  1475.                 couldn't handle that either :) Lookname is Freeware.
  1476.  
  1477.  
  1478.  
  1479.     NAME        CExt V40.2
  1480.  
  1481.     AUTHOR      Chris De Maeyer
  1482.  
  1483.     RELEASED    941016-970201
  1484.  
  1485.     LOCATION    util/cli/cext402.lha
  1486.  
  1487.     SIZE        10 KB
  1488.  
  1489.     SHORT       Utility to change/delete/renumber filenames
  1490.  
  1491.     COMMENTS    This program can only handle 1024 files, but that makes
  1492.                 sense since it does not recurse.  It can delete or rename
  1493.                 suffixes and renumber files.  Basename and range can be set.
  1494.                 Freeware.
  1495.  
  1496.  
  1497.  
  1498.     NAME        ARen 1.4
  1499.  
  1500.     AUTHOR      Mendez Marc
  1501.  
  1502.     RELEASED    941117
  1503.  
  1504.     LOCATION    util/sys/Aren14.lha
  1505.  
  1506.     SIZE        12 KB
  1507.  
  1508.     SHORT       Extension of 'Rename', replaces patterns[...]
  1509.  
  1510.     COMMENTS    A small gui-less tool that seems to do the same thing as
  1511.                 Case's -C" option, except that it does not recurse.  But it
  1512.                 lets the user specify if the replacing should be
  1513.                 case-sensitive or not.  Does not recurse into subdirs.
  1514.                 Freeware, c-source included.
  1515.  
  1516.  
  1517.  
  1518.     NAME        MultiRename v1.0
  1519.  
  1520.     AUTHOR      Daniel S. Milling Jr.
  1521.  
  1522.     RELEASED    941208
  1523.  
  1524.     LOCATION    util/misc/MRename1.lha
  1525.  
  1526.     SIZE        34 KB
  1527.  
  1528.     SHORT       Rename/renumber lists of files.
  1529.  
  1530.     COMMENTS    Another renumbering program, with an impressive GUI (judging
  1531.                 from the size of the program and the doc).  The range and
  1532.                 basename can be set.  I haven't seen it though, since it
  1533.                 crashes on my 060.  Shareware.
  1534.  
  1535.  
  1536.  
  1537.     NAME        AutoRename V1.0
  1538.  
  1539.     AUTHOR      Francesco Gambino
  1540.  
  1541.     RELEASED    950111
  1542.  
  1543.     LOCATION    util/sys/AutoRen_v10.lha
  1544.  
  1545.     SIZE        18 KB
  1546.  
  1547.     SHORT       AutoRename is a utility to rename a lot[...]
  1548.  
  1549.     COMMENTS    This program is buggy, and in italian.  Judging from the 4
  1550.                 short examples in the doc, it adds an incremented number
  1551.                 together with an optional headerstring to all the files that
  1552.                 match.  I believe I have some modules by this guy...  they
  1553.                 are a lot better than his program ;) Freeware, I think.
  1554.  
  1555.  
  1556.  
  1557.     NAME        RenumSeq.rexx 1.0
  1558.  
  1559.     AUTHOR      Christoph Mayer
  1560.  
  1561.     RELEASED    950114
  1562.  
  1563.     LOCATION    gfx/edit/RenumSeq.lha
  1564.  
  1565.     SIZE        1 KB
  1566.  
  1567.     SHORT       This ARexx-script renumbers or renames[...]
  1568.  
  1569.     COMMENTS    ARexx script to renumber filenames.  Very primitive, but I
  1570.                 guess it does its job.  Freeware.
  1571.  
  1572.  
  1573.  
  1574.     NAME        No Pain Rename 1.0
  1575.  
  1576.     AUTHOR      Travis Riggs
  1577.  
  1578.     RELEASED    9507xx
  1579.  
  1580.     LOCATION    util/sys/nopainrename.lha
  1581.  
  1582.     SIZE        140 KB
  1583.  
  1584.     SHORT       Batch filename renaming utility
  1585.  
  1586.     COMMENTS    A simple (yet huge) renumbering program, with an awful GUI.
  1587.                 Basename and range can be set.  Shareware.
  1588.  
  1589.  
  1590.  
  1591.     NAME        UnderScore 1.0
  1592.  
  1593.     AUTHOR      Braneloc
  1594.  
  1595.     RELEASED    9508xx (Recompiled 970619)
  1596.  
  1597.     LOCATION    util/cli/underscore.lha
  1598.  
  1599.     SIZE        23 KB
  1600.  
  1601.     SHORT       Removes spaces from filenames
  1602.  
  1603.     COMMENTS    Hmm...  of all the programs I've tried, this is by far the
  1604.                 most pathetic!  It's 35 kb, and all it does (no options, not
  1605.                 even filepattern!) is the same thing as writing Case -t ALL.
  1606.                 It does recurse.  In fact, it always recurses!!  Maybe you
  1607.                 think I'm a bit harsh on the programmer, but...  Get this...
  1608.                 he wants you to pay him ú10 for it!!!  The underscore.doc is
  1609.                 not a doc but a registration form!!  I'm apalled...
  1610.  
  1611.  
  1612.  
  1613.     NAME        UpperName 1.0
  1614.  
  1615.     AUTHOR      Franck Aniere
  1616.  
  1617.     RELEASED    950822
  1618.  
  1619.     LOCATION    util/batch/UpperName.lha
  1620.  
  1621.     SIZE        6 KB
  1622.  
  1623.     SHORT       Upper case filenames
  1624.  
  1625.     COMMENTS    This is the most primitive of the Case-clones I've seen.  It
  1626.                 can only uppercase one file at a time...  Freeware.
  1627.  
  1628.  
  1629.  
  1630.     NAME        LowUp 1.0
  1631.  
  1632.     AUTHOR      Franck Aniere
  1633.  
  1634.     RELEASED    95082x
  1635.  
  1636.     LOCATION    util/cli/LowUp_Upd.lha
  1637.  
  1638.     SIZE        10 KB
  1639.  
  1640.     SHORT       Upper/Lower case filenames
  1641.  
  1642.     COMMENTS    This an update of the most primitive of the Case-clones I've
  1643.                 seen.  Apparently, after the author had found out some
  1644.                 people did not like uppercase only filenames, he changed the
  1645.                 name from Uppername to LowUp.  It can now both uppercase and
  1646.                 lowercase _one_ filename at a time.  He has included a GUI
  1647.                 version as well though (written by one of the program's fans
  1648.                 (!)) which uses the reqtools library and is quite nice; but
  1649.                 it is still as limited.  All freeware.
  1650.  
  1651.  
  1652.  
  1653.     NAME        Npmv 1.0
  1654.  
  1655.     AUTHOR      Stefan Le Breton
  1656.  
  1657.     RELEASED    960122
  1658.  
  1659.     LOCATION    util/sys/npmv.lha
  1660.  
  1661.     SIZE        2 KB
  1662.  
  1663.     SHORT       Rename without(!) pattern matching
  1664.  
  1665.     COMMENTS    All this program does is to rename files whose names
  1666.                 contains characters used by the dos pattern matching.
  1667.                 Freeware.
  1668.  
  1669.  
  1670.  
  1671. Phew... so far I've found no program that I've been forced to admit is
  1672. better than Case. Now only one remain to test... The filesize worries
  1673. me, hmm.. 341 kb!? Aha... no need to worry :) Because, it is...
  1674.  
  1675.     NAME        No Pain Rename 2.0
  1676.  
  1677.     AUTHOR      Travis Riggs
  1678.  
  1679.     RELEASED    1996
  1680.  
  1681.     LOCATION    gfx/misc/rename2u.lha
  1682.  
  1683.     SIZE        174 KB
  1684.  
  1685.     SHORT       Rename multiple files with ease!
  1686.  
  1687.     COMMENTS    Well, the GUI has improved, A LOT.  And there are many new
  1688.                 features, but it is still only intended for renumbering
  1689.                 purposes.  However, if you want all the new features you
  1690.                 must pay $10 to the author, as No Pain Rename is still
  1691.                 shareware.  I really hate it when people release their
  1692.                 programs as shareware, especially cut-down versions.  But
  1693.                 that's just me...
  1694.  
  1695.  
  1696.  
  1697.     NAME        Ename v2.0
  1698.  
  1699.     AUTHOR      Rafaε Mantiuk
  1700.  
  1701.     RELEASED    960618
  1702.  
  1703.     LOCATION    util/cli/EName20.lha
  1704.  
  1705.     SIZE        8 KB
  1706.  
  1707.     SHORT       Rename many files.
  1708.  
  1709.     COMMENTS    This cli-command is quite powerful when it comes to
  1710.                 substituting or removing strings from filenames.  It can
  1711.                 also lowercase or uppercase.  I didn't find it too easy to
  1712.                 understand though, and it do also have a simulation option,
  1713.                 so as to give the user a chance to see what will happen if
  1714.                 he starts the program...  (Actually, after seeing this in
  1715.                 another program as well, I implemented it in this version of
  1716.                 Case!) One thing that impressed me was that it won't be
  1717.                 confused if one file will be given the same name as another
  1718.                 file (but which won't have this name after the operations
  1719.                 has been performed).  Does not recurse into subdirs.
  1720.                 Postcard/emailware.
  1721.  
  1722.  
  1723.  
  1724.     NAME        MRename 1.3
  1725.  
  1726.     AUTHOR      Martin Steigerwald
  1727.  
  1728.     RELEASED    960714-960921
  1729.  
  1730.     LOCATION    util/cli/mrename.lha
  1731.  
  1732.     SIZE        7 KB
  1733.  
  1734.     SHORT       Renames files in a flexible way (1.3)
  1735.  
  1736.     COMMENTS    This is a nice program that is quite like Case.  It can
  1737.                 recurse into subdirs, uppercase, lowercase, uppercase first
  1738.                 letter in every word and change extentions to a specified
  1739.                 name.  It also lets you specify if you want only dirs or
  1740.                 only files to be renamed, and there's also a testmode.  But
  1741.                 don't try this program on the ram-disk...  luckily I could
  1742.                 CTRL-C it out of its endless loop...  (See notes about the
  1743.                 ram-disk.) Freeware.
  1744.  
  1745.  
  1746.  
  1747.     NAME        RenameIt 1.0
  1748.  
  1749.     AUTHOR      Dante/Oxyron Software
  1750.  
  1751.     RELEASED    960731
  1752.  
  1753.     LOCATION    util/sys/RenameIt.lha
  1754.  
  1755.     SIZE        27 KB
  1756.  
  1757.     SHORT       Multiple file rename Tool
  1758.  
  1759.     COMMENTS    This is a quite primitive program for manipulating
  1760.                 filenames.  It seems to target extentions only, at least
  1761.                 that's what I could gather after skimming through the 3kb
  1762.                 doc...  It has a GUI though.  I don't think that's
  1763.                 appropriate for a program like this, but I guess some people
  1764.                 would prefer it.
  1765.  
  1766.  
  1767.  
  1768.     NAME        KRenamer 1.1
  1769.  
  1770.     AUTHOR      Kordi/Blabla
  1771.  
  1772.     RELEASED    970420
  1773.  
  1774.     LOCATION    util/cli/2b_KRenamer11.lha
  1775.  
  1776.     SIZE        9 KB
  1777.  
  1778.     SHORT       Changes name of all files in directory..
  1779.  
  1780.     COMMENTS    Quite nice gui-less program it seems, which lets one rename
  1781.                 all (or parts of) the files in a directory into the same
  1782.                 name, only separated by numbers.  That's currently all it
  1783.                 does though, even if the doc promises more in future
  1784.                 releases.  Does not recurse into subdirs.  Freeware.
  1785.  
  1786.  
  1787.  
  1788.     NAME        MRenfix.rexx 1.0a
  1789.  
  1790.     AUTHOR      Anders Nordby
  1791.  
  1792.     RELEASED    1996
  1793.  
  1794.     LOCATION    util/sys/mrenfix.lzh
  1795.  
  1796.     SIZE        2 KB
  1797.  
  1798.     SHORT       Changes pre-/suffixes in filenames
  1799.  
  1800.     COMMENTS    A rexx script to remove/add/change suffixes and/or prefixes.
  1801.                 Does pattermatching and recurses into subdirs.  Requesters
  1802.                 pop up if you forget some parameters.  And you'll be
  1803.                 prompted for the extentions to add/remove.  But when the
  1804.                 process finally starts, there's no indication as to what's
  1805.                 going on...
  1806.  
  1807.  
  1808. To sum up... Even Case 1.0 could do more than any of these programs
  1809. (possibly with the exception of LookName). But there seems to be a high
  1810. demand for renumbering programs. I have never found use for this myself, but
  1811. I'll probably include this in the next release.
  1812.  
  1813.  
  1814.  
  1815. **********************************************************************
  1816. **                         -+- THE END -+-                          **
  1817. **      (Notes about the ram-disk, contact me, history etc...)      **
  1818. **********************************************************************
  1819.  
  1820. NOTES ABOUT THE RAM-DISK
  1821.  
  1822.     Some 1.5 year ago, Axehandle reported a bug. Using this and that
  1823.     option on these and those files would bring Case into an endless
  1824.     loop of renamings. I thought he had a lot of nerve blaming me
  1825.     for this, when it obviously was his filematching routine that
  1826.     was flawed! I tried to reproduce the bug, but it worked on my
  1827.     machine. He persisted -- "your program is buggy!" -- and we
  1828.     almost got into an argument...
  1829.  
  1830.     I looked deeper into this, and found that I COULD reproduce the
  1831.     bug, but only when I used Case on the ram-disk. Some debugging
  1832.     revealed that his filematching routines would pass me the same
  1833.     file over and over again... Aha! With a malicious, triumphant
  1834.     smile, I called Axehandle... "Like I suspected, it IS your bug!!"
  1835.  
  1836.     But he wouldn't have it that way. "If it isn't your fault, then
  1837.     it must be a bug in the OS." he concluded calmly. "Yeah right!!"
  1838.     But... he was right. I don't remember exactly under what
  1839.     circumstances it happens, but I think that when a file change
  1840.     name, the OS will notice "oh, there's a file I didn't see
  1841.     before! better pass it.." and so I get it again. Rename it
  1842.     again, and the OS... "Oh a sandwich! I like sandwiches..."
  1843.  
  1844.     I noticed the same thing a few days ago, when I was, hmm,
  1845.     watching some pictures on the ram-disk, with viewtek #?.
  1846.     When I deleted a picture that I had just viewed, it would
  1847.     start over from the beginning, showing all the pictures that
  1848.     I had already seen.
  1849.  
  1850.     Anyway, no need to worry about this in Case! With a lot of pain
  1851.     I added the default option to read in all matching files in a
  1852.     buffer, and then rename them. More about this in the text about
  1853.     the -b and -B options.
  1854.  
  1855.  
  1856.  
  1857. BUGS???
  1858.  
  1859.     Very likely. I don't know of any at the moment though.
  1860.  
  1861.  
  1862.  
  1863. HISTORY
  1864.  
  1865.     v1.0 (950809)
  1866.  
  1867.         ** The first release.
  1868.  
  1869.  
  1870.     v2.0 (960320)
  1871.  
  1872.         ** Real filematching implemented, thanks to Axehandle. It
  1873.         uses some 2.04 functions, so Case now only works with OS 2.04++
  1874.  
  1875.         ** Lots of changes, too many to write down. No one used
  1876.         the first version anyway...
  1877.  
  1878.  
  1879.     v2.1 (971221)
  1880.  
  1881.         ** Well... I *still* haven't got any indication that I have one
  1882.         single user, after more than two years since the first release!
  1883.         Yet I code on...
  1884.  
  1885.         ** Renamed almost all options, in a vain attempt to be more
  1886.         consequent, and make the names easier to remember:
  1887.  
  1888.             -i[s|p] was renamed to -I[e|s|p] (Don't ignore extentions when caseing)
  1889.             -I[S|P] was renamed to -i[e|s|p] (Ignore extentions when caseing)
  1890.             -EU was renamed to -u(e|s|p) (Make Extention/Suffix/Prefix uppercase)
  1891.             -EL was renamed to -l(e|s|p) (Make Extention/Suffix/Prefix lowercase)
  1892.             -S<$> was renamed to -as<$> (Add specified suffix)
  1893.             -P<$> was renamed to -ap<$> (Add specified prefix)
  1894.             -s[<$>] was renamed to -rs[<$>] (Remove [specified] suffix)
  1895.             -p[<$>] was renamed to -rp[<$>] (Remove [specified] prefix)
  1896.             -r<c>.. was renamed to -d<c>.. (Delete specified char[s])
  1897.             -R<$>,.. was renamed to -D<$>,.. (Delete specified string[s])
  1898.             -e[s|p] was renamed to -s[e|s|p] (Swap extentions [or only Suffixes/Prefixes])
  1899.             -c[p|s]<#> was renamed to -L[e|s|p]<#> (Set Extention/Suffix/Prefix maxlength)
  1900.             -o was renamed to -E (Don't use default Extentions)
  1901.             -O was renamed to -e (Accept default Extentions only)
  1902.             -o<$>,.. was renamed to -E<$>,.. (Only accept specified Extentions)
  1903.             -O<$>,.. was renamed to -e<$>,.. (Only accept default Extentions & specified)
  1904.  
  1905.         ** Prefix options that default to operating on extentions, but
  1906.         that can be made to operate on only prefixes/suffixes, now accept
  1907.         e (for both) as well as the usual p (prefixes only) and s
  1908.         (suffixes only)
  1909.  
  1910.         ** All specified extentions are now added to the list of
  1911.         recognized extentions. So if you want to remove the suffix .bla,
  1912.         you only need to write -rsbla, and don't worry about whether bla
  1913.         is a recognized suffix or not.
  1914.  
  1915.         ** Any given extention will adjust the extention maxlenght, if
  1916.         (and only if) it is exceeded.
  1917.  
  1918.         ** If a filepattern contains spaces, it now must have single or
  1919.         double quotes surrounding it.
  1920.  
  1921.         ** The delete chars functions are no longer case-sensitive. If you
  1922.         want to remove all ÷:s, -d÷ will remove ÷:s as well as ╓:s.
  1923.  
  1924.         ** It is now possible to specify characters to delete on several
  1925.         places, without having the previous chars forgotten.
  1926.  
  1927.         ** If an extention operation is selected, but no extention was
  1928.         modified, or even found, Case will now display a little reminder
  1929.         that maybe this was because you wanted to process files with
  1930.         alien extentions, and maybe you should try the -e option etc. This
  1931.         is so you won't think Case is flawed, like even I myself has
  1932.         thought several times! So easy to forget...
  1933.  
  1934.         ** Made an indirect mode to read all the filenames into a
  1935.         buffer, and then rename from that. Added the options -b and -B
  1936.         to select between direct and indirect mode.
  1937.  
  1938.         ** Added -ae, add specified extention.
  1939.  
  1940.         ** Added -r(h|t)<$>, remove head or tail string
  1941.  
  1942.         ** Added -C"<$>",<$> -- change string one to string two.
  1943.  
  1944.         ** Added -C<%>[<$>,]<$>, change extentions [from this] to that.
  1945.  
  1946.         ** Added -S, simulate caseing.
  1947.  
  1948.         ** Added a new caseing operation, -c, change all cases.
  1949.  
  1950.         ** Added -m, mutilate ASCII 128-255 into 45-127
  1951.  
  1952.         ** The -v (vomit) option now turns on -m, and it will no longer
  1953.         remove the prefixes by default. You'll have to write -vp if you
  1954.         want those removed as well.
  1955.  
  1956.         ** The caseing operations (-l, -u, -c, -w, -f) will now operate
  1957.         on extentions only, if they are followed by p, s or e.
  1958.  
  1959.         ** A few minor bugs corrected
  1960.  
  1961.         ** More extentions are recognized...
  1962.            qt, gz, pi
  1963.            c++, cpp, arj, obj, env, mov, avi, jpg, tex, p61
  1964.            tar, htm, man, mpg, mp3, bz2, tgz, lzh
  1965.            jpeg, gzip, html
  1966.            amiga, prefs
  1967.            symmod
  1968.  
  1969.  
  1970.     v2.2 (980127)
  1971.  
  1972.         ** Two happy Case users revealed themselves. Thanks Trevor & mr Bouwhuis!
  1973.  
  1974.         ** Above mentioned new extentions were actually only added to the doc.
  1975.            I forgot to add them in the source. Apart from all those new
  1976.            extentions, there's three more: xm, s3m and rexx.
  1977.  
  1978.         ** Corrected flaw in the argument parsing. Case wouldn't report a
  1979.            syntax error when several source-names were entered. (This is not
  1980.            yet allowed)
  1981.  
  1982.         ** When in recursive mode, if a directory-name got renamed by Case,
  1983.            (so the characters actually changed, not only the cases) any
  1984.            files in that directory would not be found. Solved this by
  1985.            letting the pattern matching routine pass Case the directory names
  1986.            when they were leaved, instead of when they were entered.
  1987.  
  1988.         ** Whenever a file in the search path could not be locked for some
  1989.            reason, case would abort the whole operation with "can't find file
  1990.            or path!" If in the default buffered mode, no files would ever be
  1991.            renamed. Now, whenever the filematching routine cannot lock a file,
  1992.            Case will look at the name to determine if the user wanted that
  1993.            file to be renamed. (If, for instance, the user wanted to uppercase
  1994.            all filenames, and this file already was uppercased, there would be
  1995.            nothing to worry about.) If he didn't the file will simply be skipped.
  1996.            If he did, the fail counter will be incremented and the message "can't
  1997.            lock xxx because object is in use" will be displayed.
  1998.  
  1999.         ** The -C" option (change string 1 to string 2) was flawed.
  2000.            case21 -C"bl",bl bla   would result in  renaming bla to bla. Also:
  2001.            case21 -C"bl",bla bla  would not rename bla to blaa, since Case thought
  2002.            this had already been done.
  2003.  
  2004.  
  2005. THE PHUTURE
  2006.  
  2007.     Many rats has left the ship... happily eating Bill Gates' cheese,
  2008.     the cheese they once loved to curse. Well, like I use to think on the
  2009.     last night of the Roskilde festival, as a large amounts of people
  2010.     head home (even though there's one festival night left!):
  2011.     -- Only the cool people stay...
  2012.  
  2013.     I will stay, and continue releasing updates on this program. I have
  2014.     a few ideas in mind... The most important one is to implement an undo
  2015.     function. If Case should chance to really fuck up my files, I'd like
  2016.     to write Case UNDO, to restore the names. Also all known extentions
  2017.     should perhaps be flagged as prefix only, suffix only or any of the two.
  2018.  
  2019.  
  2020.  
  2021. DISCLAIMER
  2022.  
  2023.     If you are interested in the disclaimer or crap like that, then contact me.
  2024.  
  2025.  
  2026.  
  2027. CONTACT ME...
  2028.  
  2029.     If you want an update made, have bug-reports, suggestions, anything..
  2030.  
  2031.     EMail: parsec@aljan.com.au
  2032.  
  2033.     This address is at least valid to the end of mars 1998.
  2034.     After that, use: blodskam@hotmail.com
  2035.  
  2036.     I have, btw, used the handle Parsec since the summer of 1991. I know
  2037.     many people think handles are silly (albeit /nicks are "kewl"), but...
  2038.     It's a silly life! Take it seriousley, and *you* are the fool!
  2039.  
  2040.  
  2041.  
  2042. SPECIAL THANKS...
  2043.  
  2044.     * My "menthor" Thomas Richter, for helping me whenever I despair...
  2045.     * Aaron Scott, for a lot of things...
  2046.     * Phil @ AmigaGenius for giving birth to my hd-farm.
  2047.  
  2048.