https://github.com/abenz1267/bmv
bulk rename files from stdin. drop-in mv replacement.
https://github.com/abenz1267/bmv
cli go productivity rename
Last synced: 4 months ago
JSON representation
bulk rename files from stdin. drop-in mv replacement.
- Host: GitHub
- URL: https://github.com/abenz1267/bmv
- Owner: abenz1267
- License: mit
- Created: 2024-03-02T06:59:14.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-11T20:13:57.000Z (over 2 years ago)
- Last Synced: 2026-02-10T06:22:23.880Z (5 months ago)
- Topics: cli, go, productivity, rename
- Language: Go
- Homepage:
- Size: 1.42 MB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BMV - Bulkmove
Wrapper around `mv` which allows bulk operations via stdin.
bmv will also create missing directories and cleanup directories that became empty in the process. Both are configurable via flags.
## Features
- bulk renaming via stdin
- rename file(s) in editor ($EDITOR)
- define processor for renaming, f.e. `sed`
- create missing directories on the fly
- delete directories that became empty after moving
- drop-in replacement for `mv`: args/flags will be passed to `mv`
- handles circular renaming
## Installation
```sh
# Arch
yay -S bmv
yay -S bmv-bin
# via Go
go install github.com/abenz126/bmv@latest
```
`mv` instance being used is `/usr/bin/mv`, unless `$BMV_MV` is specified.
## Usage
```sh
# normal 'mv' actions, simply passed to 'mv':
bmv oldfile newfile
# bmv specific:
<2 column output from external [src dest\n]> | bmv
fzf -m | bmv -e # defaults to $EDITOR
fzf -m | bmv -e=vim
ls | bmv -p sed 's/old/new/'
bmv -p sed 's/old/new/' # implicit call to 'ls'
bmv # same as 'ls | bmv -e'
```