A CLI tool to enable batch renaming of files.
-
Clone the repo and add
bin/batch_rename.exe
to PATH:gh repo clone POWRFULCOW89/batch_rename
or
-
Get the pub package:
dart pub add batch_rename
and build from source:
dart compile exe .\bin\batch_rename.dart
or
-
Grab a prebuilt binary.
batch-rename.exe substring [new_string] [-h] [-n] [-r]
positional arguments:
substring Substring to strip or replace out of every file in path.
new_string String to replace for every matching substring. Defaults to an empty string.
optional arguments:
-h, --help show this help message and exit.
-n Rename all files to substring and number them accordingly.
-r Batch rename recursively in subdirectories.
-
Output a standard set from
favicon.png
:batch_rename favicon.png
-
Output the standard, Apple and Windows 10 sets from
logo.jpg
:batch_rename logo.jpg -a -w
-
Strip all brackets and their content:
batch_rename "\[.+\]"