https://github.com/felipemaced0/rename
A very handy and simple cli rename utility
https://github.com/felipemaced0/rename
go go-cli rename rename-files
Last synced: 6 months ago
JSON representation
A very handy and simple cli rename utility
- Host: GitHub
- URL: https://github.com/felipemaced0/rename
- Owner: FelipeMaced0
- License: bsd-3-clause
- Created: 2024-03-26T03:19:50.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-03-31T02:04:37.000Z (over 1 year ago)
- Last Synced: 2024-03-31T03:20:26.445Z (over 1 year ago)
- Topics: go, go-cli, rename, rename-files
- Language: Go
- Homepage:
- Size: 2.87 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Introduction
This cli utility is meant to be used when in need of standardazing folder containing multiple files with diferent name conventions. When yout find yourself renaming files by hand and removing accents, choosing a separetor and a case for the names, it becomes very tiring and time consuming and error prone as time goes by. That being said, it is a good call to have an automated yet flexible way to rename your files.
## PrerequisitesFor it to work properly is necessary to have go installed on your machine. Head to go website to download latest [go](https://go.dev/dl) version. If you pretends to use metadata to add to your filenames it is necessary to install `exiftool` and have it on the machines `PATH`. You can run `apt install exiftool`
or use your package manager of choice.## Build
No magic here, just run `go build` inside the project's folder
## Usage
```
bulk rename filesUsage:
rename bulk [flags]Flags:
-a, --all Rename all files
--ascii Rename to ascii only characters
--attach-title Attach Title(Generally in text file)
--author Attach Author(Generally in text file)
--auto-separetor Guess separetor and replace with _
-c, --copy-path string Copy files to destination folder with new names(recommended)
--create-date Attach create date
--dimension Attach image size to file name WidthxHeight
--duration Attach video duration
--file-size Attach file size to file name
-h, --help help for bulk
--inplace Rename file inplace(possible loss of information)
--limit int32 Limit of renamed files
-l, --lower Rename to lowercase case
-p, --path string Path of your folder containing the files that sould be renamed
--prefix string Add at the begin of every file
-r, --replace-separetor string Separetor to put between words on file name (default "_")
--suffix string Add at the end of every file
-t, --title Rename to title case
-u, --upper Rename to uppercase case
```# Examples
`rename bulk --path="your/path/folder/to/rename" --inplace -u`
Here `--path` is the path of the folder containing the files to be renamed, `--inplace` files will be renamed in the current folder(see`--copy-path`) and `-u` is
the flag responsible for upper case the names`rename bulk --path="your/path/folder/to/rename" --copy-path="your/new/folder/location" -l`
Here `--path` is the path of the folder containing the files to be renamed, `--copy-path` is the path of destination of the files(see`--inplace`) and `-l` is
the flag responsible for lower case the names`rename bulk --path="your/path/folder/to/rename" --copy-path="your/new/folder/location" -l --auto-separetor`
Here `--path` is the path of the folder containing the files to be renamed, `--copy-path` is the path of destination of the files(see`--inplace`) and `-l` is
the flag responsible for lower case the names, `--auto-separetor` will guess the separetor used on the file name "your_name_is" or "your-name-is" or "your name is" and replace by one occurence of "_".