| |
---|
| | renaming token in our pattern. The ``+`` here means to construct |
---|
| | the sequence in *ascending* order. A ``-`` would specify |
---|
| | *descending* order. |
---|
| | |
---|
| | There are many other renaming tokens and ways to construct |
---|
| | all manner of clever templates. These are discussed below in the |
---|
| | section entitled `TEMPLATE CONSTRUCTION`_. |
---|
| | |
---|
| | Notice that there is *no old string* in our example above. |
---|
| | That is, there is nothing to the left of the ``=`` symbol |
---|
| | in the ``-r`` option. This effectively means "match anything" |
---|
| | in the existing file or directory name. If you were using |
---|
| |
---|
| | |
---|
| | tren.py -x -r /$SYSNAME/*.bku=/$SYSNAME/*.bku.old |
---|
| | |
---|
| | If your system name were "matrix", then the command above would only |
---|
| | rename files in the form ``matrix<anytext>bku``. If your system name |
---|
| | rename files in the form ``matrix<anytext>.bku``. If your system name |
---|
| | were "modar", then the command above would only rename files in the |
---|
| | form ``modar<anytext>bku``. |
---|
| | form ``modar<anytext>.bku``. |
---|
| | |
---|
| | There are a couple of things to keep in mind when doing things like |
---|
| | this: |
---|
| | |
---|
| |
---|
| | valid Python regular expression*. This may involve |
---|
| | explicit quoting of the renaming tokens used in the old |
---|
| | string specification. |
---|
| | |
---|
| | |
---|
| | There are many other renaming tokens and ways to construct |
---|
| | all manner of clever templates. These are discussed below in the |
---|
| | section entitled `TEMPLATE CONSTRUCTION`_. |
---|
| | |
---|
| | |
---|
| | OPTIONS |
---|
| | ------- |
---|
| |
---|
| | ----------------------------- |
---|
| | |
---|
| | :: |
---|
| | |
---|
| | $Id: tren.rst,v 1.123 2010/01/19 20:49:31 tundra Exp $ |
---|
| | $Id: tren.rst,v 1.124 2010/01/19 20:52:14 tundra Exp $ |
---|
| | |
---|
| | You can find the latest version of this program at: |
---|
| | |
---|
| | http://www.tundraware.com/Software/tren |
---|
| | |