Cross-Platform Batch File Renaming Tool
Project description
‘tren’ is a general purpose file and directory renaming tool. Unlike commands like ‘mv’, ‘tren’ is particularly well suited for renaming batches of files and/or directories with a single command line invocation. ‘tren’ eliminates the tedium of having to script simpler tools to provide higher-level renaming capabilities.
‘tren’ is also adept at renaming only part of an existing file or directory name either based on a literal string or a regular expression pattern. You can replace any single, group, or all instances of a given string in a file or directory name.
‘tren’ implements the idea of a renaming token. These are special names you can embed in your renaming requests that represent things like the file’s original name, its length, date of creation, and so on. There are even renaming tokens that will substitute the content of any environment variable or the results of running a program from a shell back into the new file name.
‘tren’ can automatically generate sequences of file names based on their dates, lengths, times within a given date, and so on. In fact, sequences can be generated on the basis of any of the file’s ‘stat’ information. Sequence “numbers” can be ascending or descending and the count can start at any initial value. Counting can take place in one of several internally defined counting “alphabets” (decimal, hex, octal, alpha, etc.) OR you can define your own counting alphabet. This allows you to create sequences in any base (2 or higher please :) using any symbol set for the count.
‘tren’ is written in pure Python and requires Python version 2.6.x or later. It is known to run on various Unix-like variants (FreeBSD, Linux, MacOS X, cygwin) as well as Windows. It will also take advantage of ‘win32all’ Python extensions on a Windows system, if they are present.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file tren-1.239.tar.gz
.
File metadata
- Download URL: tren-1.239.tar.gz
- Upload date:
- Size: 644.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a80b4b35a068ec5b2e7b277a7b2111aa27ed66e1310aec5494d910ad9300b47f |
|
MD5 | 688fb9b53df7ffa59ff1bb52704586f0 |
|
BLAKE2b-256 | 10978e5e26532ad90cef03bce200c5cdeb93fce82357c2871dbf98697d2b7806 |