Skip to content
/ mmv-c Public
forked from mcauley-penney/mmv-c

Interactively rename files with your favorite editor

License

Notifications You must be signed in to change notification settings

balaraz/mmv-c

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mmv-c 📦

Build

Edit file and directory names in $EDITOR. Inspired by itchyny/mmv.

usage

mmv behaves like other commandline tools: it accepts a list of arguments, including patterns like wildcards. See man mmv for options.

example

mmv

In the above example, mmv is provided the verbose argument so that it will list what renames it conducts and three wildcard arguments that are duplicates of each other:

  1. the set of files in the current directory that begin with test
  2. the same set of files as before
  3. the same set of files again, except using an alternate path string

mmv is capable of removing duplicate arguments even when the input strings don't match, for example test0.txt and ~/test_dir/test0.txt. In the editing buffer, we see only one instance of each unique file, though three were given for each. When cycles between renames are detected, for example renaming test0.txt to test1.txt even though that destination already exists, mmv will remove the cycles by conducting intermediate renames on only those files which are detected as cycles, i.e. it avoids renaming everything when a cycle is detected. These intermediate rename operations are visible in the verbose output. cat is used here to display that the contents of the files remains the same.

installation

  1. Clone this repository and enter the repo directory
 $ git clone https://github.com/mcauley-penney/mmv-c.git --recurse-submodules
 $ cd mmv-c

If you do not plan to run tests, then --recurse-submodules can be removed.

  1. Generate build file and run build
 $ cmake -Bbuild -DCMAKE_BUILD_TYPE=Release
 $ cmake --build ./build
  1. Install
$ sudo cmake --install ./build

Or if you want to change prefix use --prefix=<path(/usr, /usr/local, $HOME/.local)> option.

  1. Feel free to remove the cloned repo
 $ cd ..
 $ rm -rf mmv-c
$ sudo cmake --install ./build

credit

itchyny/mmv

Glenn Fowler, Landon Curt Noll, and Kiem-Phong Vo

Mike Parker, David MacKenzie, Jim Meyering, and all of the contributors to coreutils/mv

About

Interactively rename files with your favorite editor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 96.3%
  • CMake 3.7%