diff --git a/tren.rst b/tren.rst index 15351b2..2d5d8a9 100644 --- a/tren.rst +++ b/tren.rst @@ -1102,6 +1102,16 @@ tren.py -i1 -r foo=bar -i2 -r foo=bar foo1-foo2-foo3.foo4 +A good way to get an idea of how incremental renamings *would* take +place is to run **tren** is test and debug modes because debug +will dump an incremental renaming sequence description as it goes:: + + tren.py -tdq -rfi=fud -et fee_fi_fo + +The (partial) debug output will show you this:: + + tren.py DEBUG: Renaming Sequence: fee_fi_fo--->fee_fud_fo--->Fee_Fud_Fo + More About Command Line Pitfalls ================================ @@ -1298,11 +1308,45 @@ upper case ``A`` in the target file names. +Forcing Case Transformation +=========================== + +Sometimes you want to actually force the case of the characters +in a filename to change. You do this with the ``-e`` option. +This option takes one of several arguments:: + + c - Capitalize the file name + l - Force file name to lower-case + s - Swap case of file name characters + t - Force file name to title case + u - Force file name to upper-case + +"Title case" just means that any alphabetic character following +a non-alphabetic character will be capitalized:: + + tren.py -et fee_fi_fo # -> Fee_Fi_Fo + +These case transformations are a kind of special built-in renaming +request with one important difference: The ``-i`` "instance" setting +is ignored. That's because the ``-e`` option isn't based on replacing +an "old" string like the ``-r`` renaming option, but rather operates +on the file name as a whole. + +As with all renaming requests, ``-e`` is just another *incremental* +renaming operation on the command line:: + + + tren.py -rfi=fud -et fee_fi_fo # -> fee_fud_fo -> Fee_Fud_Fo + +You can actually watch these increments happen by using the ``-d`` +command line option. + + The Strange Case Of Mac OS X And Windows ======================================== Mac OS X and Windows have an "interesting" property that makes case -handling a bit tricky. Both of these operating systems *preserve* +renaming a bit tricky. Both of these operating systems *preserve* case in file and directory names, but they do not *observe* it. (It is possible to change this behavior in OS X when you first prepare a drive, and make the filesystem case sensitive. This is rarely done in @@ -3021,7 +3065,7 @@ :: - $Id: tren.rst,v 1.196 2010/11/16 20:31:33 tundra Exp $ + $Id: tren.rst,v 1.197 2010/11/16 20:49:40 tundra Exp $ You can find the latest version of this program at: