| |
---|
| | |
---|
| | |
---|
| | |
---|
| | Using Regular Expressions |
---|
| | ------------------------- |
---|
| | ========================= |
---|
| | |
---|
| | Ordinarily **tren** treats both the old string you specify with the |
---|
| | '``-r``' option *literally*. However, it is sometimes handy to be able |
---|
| | to write a regular expression to specify what you want replaced. If |
---|
| |
---|
| | |
---|
| | |
---|
| | |
---|
| | An Overview Of Renaming Tokens |
---|
| | ------------------------------ |
---|
| | ============================== |
---|
| | |
---|
| | **tren** implements the notion of *Renaming Tokens*. These can |
---|
| | appear in either the '``old``' or '``new``' string components of a '``-r``' |
---|
| | renaming argument. |
---|
| |
---|
| | section below entitled `RENAMING TOKENS: THE GORY DETAILS`_. |
---|
| | |
---|
| | |
---|
| | COMMAND LINE TOGGLES |
---|
| | -------------------- |
---|
| | ==================== |
---|
| | |
---|
| | **tren** defaults to a specific set of behaviors: |
---|
| | |
---|
| | - '``old``' and '``new``' renaming text is treated *literally* |
---|
| |
---|
| | be replaced with '``S``'. |
---|
| | |
---|
| | |
---|
| | OTHER PROGRAM SEMANTICS |
---|
| | ----------------------- |
---|
| | ======================= |
---|
| | |
---|
| | It's important to understand some subtleties of just how **tren** |
---|
| | works, particularly if you intend to create complex, multi-replacement |
---|
| | command lines: |
---|
| |
---|
| | and go on to the next one. |
---|
| | |
---|
| | |
---|
| | RENAMING TOKENS: THE GORY DETAILS |
---|
| | --------------------------------- |
---|
| | ================================= |
---|
| | |
---|
| | As we've just seen, a *Renaming Token* is nothing more than |
---|
| | a string representing something **tren** knows about. These |
---|
| | fit in one of three categories: |
---|
| |
---|
| | releases of **tren** may add more of these, so it's good to |
---|
| | periodically reread this material. |
---|
| | |
---|
| | File Attribute Renaming Tokens |
---|
| | --------------------------------- |
---|
| | ============================== |
---|
| | |
---|
| | These tokens are derived from information about the file or |
---|
| | directory being renamed. |
---|
| | |
---|
| |
---|
| | |
---|
| | |
---|
| | |
---|
| | System Related Renaming Tokens |
---|
| | --------------------------------- |
---|
| | ============================== |
---|
| | |
---|
| | These tokens are derived from the underlying operating system |
---|
| | and runtime environment. |
---|
| | |
---|
| |
---|
| | context using this construct. |
---|
| | |
---|
| | |
---|
| | Sequence Renaming Tokens |
---|
| | --------------------------- |
---|
| | ======================== |
---|
| | |
---|
| | Sometimes it's useful to rename files or directories based on some |
---|
| | *property they possess* like the date or time of creation, the size of |
---|
| | the file, who owns it, and so on. That's the idea behind the '``/D/``', |
---|
| |
---|
| | various ways to create sequences that can be embedded in the final |
---|
| | file or directory name. |
---|
| | |
---|
| | General Format Of Sequence Renaming Tokens |
---|
| | ------------------------------------------ |
---|
| | ========================================== |
---|
| | |
---|
| | Sequence renaming tokens consist of three descriptive components and |
---|
| | have the following general format:: |
---|
| | |
---|
| |
---|
| | T sequence on file creation time within a given day |
---|
| | |
---|
| | |
---|
| | Count Pattern Format |
---|
| | -------------------- |
---|
| | ==================== |
---|
| | |
---|
| | The counting pattern is used to specify two things: The width of the |
---|
| | sequence string, and the starting value for the sequence. Examples:: |
---|
| | |
---|
| |
---|
| | *initial sequence value you specified*. |
---|
| | |
---|
| | |
---|
| | Types Of Sequence Renaming Tokens |
---|
| | --------------------------------- |
---|
| | ================================= |
---|
| | |
---|
| | Sequence renaming tokens are thus a way to generate an ordering *based |
---|
| | on some property common to everything being renamed*. Keep in mind |
---|
| | that for purposes of sequencing, **tren** *makes no distinction |
---|
| |
---|
| | If you have experience, positive or negative, using **tren** on other |
---|
| | OS/bitsize systems, please contact us at the email address below. |
---|
| | |
---|
| | |
---|
| | HOW COME THERE'S NO GUI? |
---|
| | ------------------------ |
---|
| | |
---|
| | **tren** is primarily intented for use by power users, sys admins, and |
---|
| | advanced users that (mostly) find GUIs more of a nuisance than a help. |
---|
| | There are times, however when it would be handy to be able to select |
---|
| | the files to be renamed graphically. TundraWare has a freely |
---|
| | available file browser that is macro programmed. It will work nicely |
---|
| | in such applications: |
---|
| | |
---|
| | http://www.tundraware.com/Software/twander/ |
---|
| | |
---|
| | |
---|
| | COPYRIGHT AND LICENSING |
---|
| | ----------------------- |
---|
| | |
---|
| | **tren** is Copyright (c) 2010 TundraWare Inc. |
---|
| |
---|
| | ----------------------------- |
---|
| | |
---|
| | :: |
---|
| | |
---|
| | $Id: tren.rst,v 1.144 2010/03/23 21:12:08 tundra Exp $ |
---|
| | $Id: tren.rst,v 1.145 2010/03/23 21:29:11 tundra Exp $ |
---|
| | |
---|
| | You can find the latest version of this program at: |
---|
| | |
---|
| | http://www.tundraware.com/Software/tren |
---|
| |
---|
| | |