- Pattern must be a string with some
*
(star) symbols. Each of this characters will be replaced with a substings to make pattern a name of to be moved - Template is a string with some
#
symbols followed by natural numbers. Is some file matched pattern, each of#
things will be replaced with corresponding pattern substings to construct a new filename - If you want
mmv
to overwrite existing files, you should provide a-f
flag, otherwisemmv
will do nothing.
mmv prefix*suffix new_prefix#1new_suffix
will move all files withprefix
andsuffix
to same names, but withnew_prefix
andnew_suffix
.mmv old new
will behave just as an usualmv
command and rename a single file if such exists.mmv a*c* a#1c
will trunk suffixes of all files matchinga*c*
template (meaning such files should start witha
letter and containgc
further).mmv 1*3 a#1
. If current directory contains files like 123, 1113, 13, 143, they will be renamed to a2, a11, a, a4 respectively
- use
cargo build --release
for release-ready binary