New intro and doc structure.
Updated command line options.
Noted version of Python required and cygwin limitations.
1 parent 114fb0f commit 3718d7d493ff33eeadc5bf40da05bab18c63125d
@tundra tundra authored on 19 Mar 2010
Showing 1 changed file
View
102
tren.rst
----
 
**tren** - Advanced File Renaming
 
 
HOW TO USE THIS DOCUMENT
------------------------
 
**tren** is a powerful command line file/directory renaming tool. It
implements multiple, sophisticated renaming features than can be a bit
complex to learn. For this reason, this document is split into two
general sections: `REFERENCE`_ and `TUTORIAL AND DESCRIPTION`_. If
you are new to **tren**, start by studying the latter section first.
It will take you from very simple- to the most complex renaming
operations the program supports. Once you've got a sense of what
**tren** can do, the reference section will be handy to look up
options and their arguments.
 
.. WARNING:: **tren** is very powerful and can easily and
automatically rename things in ways you didn't intend.
It is ***strongly*** recommended that you try out new
**tren** operations with the ``-t`` option on the command
line. This turns on the "test mode" and will show you
what the program *would* do without actually doing it.
It goes without saying that you should be even more
careful when using this program as the system root or
administrator. It's quite easy to accidentally rename
system files and thereby clobber your OS. You have been
warned!!!
 
REFERENCE
---------
 
 
SYNOPSIS
--------
 
::
 
tren.py [-1abCcdEefghqtvXx] [-I file] [-l string] [-r old=new]... file|dir file|dir ...
tren.py [-aCcdfhqtvXx] [-A alphabet] [-I file] [-i range] [-P esc] [-R sep] [-r old=new] [-S suffix] [-w width] file|dir ...
 
 
OPTIONS
-------
and supercede any options specified in the environment variable.
Think of any options set in ``$TREN`` as the "leftmost command line
options".
 
You may interweave option and file/dir name specifications on
the command line::
 
tren.py -opt1 -opt2 -opt3 file|dir.. -opt4 -opt5 -opt6 file|dir ...
All options must precede the list of files and/or directories being
renamed. If one of your rename targets start with the ``-`` character,
most command shells recognines the double dash as an explicit
"end of options" delimiter::
 
tren.py -opt -opt -opt -- -this_file_starts_with_a_dash
 
This allows you to rename different files and directories with
different options. *However*, keep in mind that all the options to
the left of the file or directory being renamed are in force. That
(*Default*: Treat the old string as literal text)
 
 
 
DESCRIPTION
-----------
TUTORIAL AND DESCRIPTION
------------------------
 
.. WARNING:: **tren** is a powerful file and directory renaming tool.
Be **sure** you know what you're about to do. If you're
not, run the program in test mode (invoke with the ``-t``
 
tren.py -e -r =/D/ file.1 # file.20100112
 
 
OTHER
-----
 
You must have a reasonably current version of Python installed.
 
 
BUGS AND MISFEATURES
--------------------
 
On windows platforms, the ``/U/`` and ``/G/`` do not return the
underlying operating system ownership information.. They return
``winuser`` and ``wingroup`` respectively.
BUGS, MISFEATURES, OTHER
------------------------
 
You must be running Python 2.6.x or later. **tren** makes use of
features not supported in released prior to this.
 
As a general matter, **tren** should run on any POSIX-compliant OS
that has this version (or later) of Python on it. It will also run on
many Microsoft Windows systems. If the Windows system has the
``win32all`` Python extensions installed, **tren** will take advantage
of them for purposes of deriving the names of the user and group that
own the file or directory being renamed.
 
As of this writing, **tren** will not run in the **cygwin** environment
because their version of Python is still backleveled to 2.5.x. When
and if the **cygwin** team upgrades to 2.6.x, **tren** is expected to
work there as well.
 
This program is **EXPERIMENTAL** (see the license). This means it's
had some testing but is certainly not guaranteed to be perfect. As of
this writing, it has been run on FreeBSD, Linux, Windows XP, and Mac
OS X. It has not, however, been run on 64-bit versions of those OSs.
 
If you have experience, positive or negative, using **tren** on other
OS/bitsize systems, please contact us at the email address below.
 
 
COPYRIGHT AND LICENSING
-----------------------
 
-----------------------------
 
::
 
$Id: tren.rst,v 1.136 2010/01/25 20:49:26 tundra Exp $
$Id: tren.rst,v 1.137 2010/03/19 17:19:14 tundra Exp $
 
You can find the latest version of this program at:
 
http://www.tundraware.com/Software/tren