All Projects → adriangoransson → renamer

adriangoransson / renamer

Licence: MIT license
Command line tool to rename multiple files at once.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to renamer

FileRenamerDiff
A File Renamer App featuring a difference display before and after the change.
Stars: ✭ 32 (-59.49%)
Mutual labels:  regex, rename-files, renamer
renameit
Rename-It! is a Windows software to safely rename of thousands of files and folders at once via regex and all kind of other renaming filters. See the wiki section for more details.
Stars: ✭ 94 (+18.99%)
Mutual labels:  regex, rename-files
VIDEOconvertor
A stable and Fast telegram video convertor bot which can encode into different libs and resolution, compress videos, convert video into audio and other video formats, rename with thumbnail support, generate screenshot and trim videos.
Stars: ✭ 180 (+127.85%)
Mutual labels:  rename-files, renamer
FileRenameBot
A Telegram File Renamer Bot With Permanent Thumbnail Support Also It Can Convert Files Into Video!!
Stars: ✭ 369 (+367.09%)
Mutual labels:  rename-files, renamer
java-core
Collections of solutions for micro-tasks created while building modules as part of project. Also has very fun stuffs :)
Stars: ✭ 35 (-55.7%)
Mutual labels:  regex
cryptaddress.now
A minimal service to detect which cryptocurrency an address corresponds to.
Stars: ✭ 23 (-70.89%)
Mutual labels:  regex
is-regex
Is this value a JS regex?
Stars: ✭ 22 (-72.15%)
Mutual labels:  regex
RideShare-Trip-Stats
Chrome Extension to visualize your uber trip statistics
Stars: ✭ 61 (-22.78%)
Mutual labels:  regex
replace
Generic file search & replace tool, written in Python 3
Stars: ✭ 28 (-64.56%)
Mutual labels:  regex
js-diacritic-regex
Creates the inverse of transliterated string to a regex. What? Basically, diacritic insensitiveness
Stars: ✭ 20 (-74.68%)
Mutual labels:  regex
ocaml-re-nfa
OCaml code to construct an NFA from a regular expression
Stars: ✭ 44 (-44.3%)
Mutual labels:  regex
python-hyperscan
A CPython extension for the Hyperscan regular expression matching library.
Stars: ✭ 112 (+41.77%)
Mutual labels:  regex
clausejs
Write contract once. Get data & function validators & conformers, an accurate & readable project contract, auto-generated API documentation, generative test coverage, plus more. A tool that enables a more predictable workflow for developing your JavaScript projects.
Stars: ✭ 29 (-63.29%)
Mutual labels:  regex
rename-tool
一个基于 .NET Core 2.x 实现的项目重命名工具
Stars: ✭ 16 (-79.75%)
Mutual labels:  rename-files
antk
Redkato, - Indonesian anime scraper
Stars: ✭ 14 (-82.28%)
Mutual labels:  regex
pysorter
A command line utility for organizing files and directories according to regex patterns.
Stars: ✭ 40 (-49.37%)
Mutual labels:  regex
loadkit
Java 资源加载器,充分拓展ClassLoader#getResources(name)的能力,实现递归加载,支持普通风格 / 包名风格 / ANT风格 / 正则风格路径的资源加载同时支持自定义过滤器,通常作为框架的基础类库。
Stars: ✭ 39 (-50.63%)
Mutual labels:  regex
git-search-replace
A utility on top of Git for project-wide search-and-replace that includes filenames too
Stars: ✭ 42 (-46.84%)
Mutual labels:  regex
expand-brackets
Expand POSIX bracket expressions (character classes) in glob patterns.
Stars: ✭ 26 (-67.09%)
Mutual labels:  regex
django-redirects
↪️ ✅ redirects as they should be, with full control.
Stars: ✭ 32 (-59.49%)
Mutual labels:  regex

Renamer

A bulk renaming tool for files.

Features

  • Rename one or several patterns in your files using the powerful Rust regex engine.
  • Add an increment as a prefix or suffix to files.

And, uh, it's pretty speedy I guess? I'm hoping it's cross platform too but so far I have only tested it on *nix systems.

Installation

Have a look at the releases page for pre-built binaries.

With Cargo.

$ cargo install renamer

Usage

USAGE:
    renamer [FLAGS] [OPTIONS] <pattern> <files>...

FLAGS:
    -d, --dry-run                 Perform a dry-run. Do everything but the actual renaming. Implies verbose
    -f, --force                   Do not exit or ask for confirmation when overwriting files
    -g, --global                  Test the regular expression against all possible matches instead of only the first
    -h, --help                    Prints help information
        --ignore-invalid-files    Ignores directories passed to the program as files. Useful for shell globbing
    -i, --interactive             Ask for confirmation before overwrite. The program will otherwise exit unless --force
                                  is passed
    -V, --version                 Prints version information
    -v, --verbose                 Print operations as they are being performed

OPTIONS:
    -e, --regexp <patterns>...
            Additional patterns. These can be supplied multiple times. Patterns are executed in the order they are
            passed, starting with the mandatory pattern
        --prefix-increment <prefix-increment>
            Prefix files with an increasing counter in the specified format. E.g. 0501 => 0501filename, 0502filename.
            Applied after pattern replacements
        --suffix-increment <suffix-increment>
            See --prefix-increment. Will try to insert suffix before the file extension


ARGS:
    <pattern>     Regex pattern to match and the string to replace it with. (REGEX=REPLACEMENT)
    <files>...    Files to rename

Examples

Add a prefix or a file extension.

# Add a prefix
$ renamer '^=2020-07-18 ' img*

# Add an extension
$ renamer '$=.bak' file1 file2

# Change extension
$ renamer 'JPEG$=jpg' *.JPEG

# Multiple patterns. Change extension and remove a prefix.
$ renamer 'JPEG$=jpg' -e '^some_prefix_=' *

Rearrange parts of files. The following describes the various ways to use capture groups, including named groups.

$ renamer --verbose '(?P<index>\d{2}\.) (.*)\.(?P<ext>)=${index} Lady Gaga - $2.$ext' *.mp3
01. Chromatica I.mp3 -> 01. Lady Gaga - Chromatica I.mp3
02. Alice.mp3 -> 02. Lady Gaga - Alice.mp3
03. Stupid Love.mp3 -> 03. Lady Gaga - Stupid Love.mp3
04. Rain On Me.mp3 -> 04. Lady Gaga - Rain On Me.mp3
05. Free Woman.mp3 -> 05. Lady Gaga - Free Woman.mp3
06. Fun Tonight.mp3 -> 06. Lady Gaga - Fun Tonight.mp3
07. Chromatica II.mp3 -> 07. Lady Gaga - Chromatica II.mp3
08. 911.mp3 -> 08. Lady Gaga - 911.mp3
09. Plastic Doll.mp3 -> 09. Lady Gaga - Plastic Doll.mp3
10. Sour Candy.mp3 -> 10. Lady Gaga - Sour Candy.mp3
11. Enigma.mp3 -> 11. Lady Gaga - Enigma.mp3
12. Replay.mp3 -> 12. Lady Gaga - Replay.mp3
13. Chromatica III.mp3 -> 13. Lady Gaga - Chromatica III.mp3
14. Sine From Above.mp3 -> 14. Lady Gaga - Sine From Above.mp3
15. 1000 Doves.mp3 -> 15. Lady Gaga - 1000 Doves.mp3

Add digits to easily sort files. Useful if you were to flatten directory structures but still want your files nicely sorted.

$ renamer -v '^=_' --prefix-increment 0201 Westworld01.mkv Westworld.S02E02.mkv Westworld_3.mkv
Westworld01.mkv -> 0201_Westworld01.mkv
Westworld.S02E02.mkv -> 0202_Westworld.S02E02.mkv
Westworld_3.mkv -> 0203_Westworld_3.mkv

Also possible to add suffixes with --prefix-suffix.

Acknowledgements

Inspired greatly by the original rename.pl. The aim is to have similar features but with faster execution time and a slightly more intuitive syntax for those not so familiar with regexes.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].