| |
---|
| | Most commonly, you'll find yourself using the command line, |
---|
| | alphabetic, original name, length, and various time/date renaming |
---|
| | tokens. |
---|
| | |
---|
| | .. TIP:: **tren** is portable across many operating systems because |
---|
| | it is written in the Python programming language. Python |
---|
| | *mostly* works the exact same way everywhere. However, |
---|
| | Windows presents some problems because it does not quite |
---|
| | work the same way as Unix-derived OSs do. In particular, if |
---|
| | you need to make use of the User/Group Name renaming tokens |
---|
| | on Windows, consider installing the ``win32all`` extensions |
---|
| | to your Windows Python installation. If you don't, **tren** |
---|
| | will base its order on the generic names ``WindowsUser`` and |
---|
| | ``WindowsGroup``. |
---|
| | |
---|
| | In any case, User/Group *ID* numbers, and the Nlink values |
---|
| | are not meaningful under Windows and default to 0. Renaming |
---|
| | tokens based on these IDs should thus be avoided on Windows |
---|
| | systems since every file- and directory will have the same |
---|
| | ID. |
---|
| | |
---|
| | |
---|
| | There is one other important detail to keep in mind here. When |
---|
| | **tren** first starts up, it examines the metadata of every file- and |
---|
| | directory name on the command line. It uses this to pre-create the |
---|
| | sequences for every possible ordering (alphabetic, by date, within |
---|
| |
---|
| | ================================= |
---|
| | |
---|
| | |
---|
| | These tokens are derived from information about the file or |
---|
| | directory being renamed. (Windows users, see the section above, |
---|
| | `How tren Uses File Metadata`_, on limitatioins of ``/GID/``, |
---|
| | ``/GROUP/``, ``/UID/``, ``/USER``, & ``/NLINK/``.) |
---|
| | |
---|
| | directory being renamed. |
---|
| | |
---|
| | .. NOTE:: **Windows Users Take Note!** |
---|
| | |
---|
| | **tren** is portable across many operating systems because |
---|
| | it is written in the Python programming language. Python |
---|
| | *mostly* works the exact same way everywhere. However, |
---|
| | Windows presents some problems because it does not quite |
---|
| | work the same way as Unix-derived OSs do. In particular, if |
---|
| | you need to make use of the ``/GROUP/`` or ``/USER/`` |
---|
| | renaming tokens on Windows, consider installing the |
---|
| | ``win32all`` extensions to your Windows Python installation. |
---|
| | If you don't, **tren** will base its order on the generic |
---|
| | names ``WindowsUser`` and ``WindowsGroup`` which it will |
---|
| | apply to every file- or directory under consideration. |
---|
| | |
---|
| | In any case, ``/DEV/``, ``/GID/``, ``/INODE/``, ``/NLINK/``, |
---|
| | and ``/UID/`` are not meaningful under Windows and default |
---|
| | to 0. Avoid using these tokens on Windows systems, since |
---|
| | these will return the same value for every file- or |
---|
| | directory. |
---|
| | |
---|
| | ``/DEV/ Returns File- Or Directory's Device ID`` |
---|
| | |
---|
| | This is the ID of the device containing the file being |
---|
| |
---|
| | |
---|
| | This is the number for the group to which the file- or |
---|
| | directory belongs. One way to use this is to prepend it |
---|
| | to every file name, thereby having all files (and or |
---|
| | directories) in the same group sort together in a sorted |
---|
| | directories) in the same group list together in a sorted |
---|
| | directory listing:: |
---|
| | |
---|
| | tren.py -r=/GID/-/FNAME/ * |
---|
| | |
---|
| |
---|
| | ``/INODE/ Returns File- Or Directory's Serial Number`` |
---|
| | |
---|
| | This is typically an identifier to the directory entry |
---|
| | for the file- or directory being renamed. ``/DEV/`` and |
---|
| | ``/INODE`` taken together provide a unique systemwide |
---|
| | ``/INODE/`` taken together provide a unique systemwide |
---|
| | identifier for the file- or directory being renamed. |
---|
| | |
---|
| | ``/MODE/ Returns File- Or Directory's Permissions`` |
---|
| | |
---|
| |
---|
| | ----------------------------- |
---|
| | |
---|
| | :: |
---|
| | |
---|
| | $Id: tren.rst,v 1.172 2010/04/03 15:40:42 tundra Exp $ |
---|
| | $Id: tren.rst,v 1.173 2010/04/05 19:31:25 tundra Exp $ |
---|
| | |
---|
| | You can find the latest version of this program at: |
---|
| | |
---|
| | http://www.tundraware.com/Software/tren |
---|
| |
---|
| | |