https://github.com/bulletmark/rename-clean
Utility to replace undesirable characters in Linux file names
https://github.com/bulletmark/rename-clean
rename rename-files rename-files-and-directories
Last synced: 29 days ago
JSON representation
Utility to replace undesirable characters in Linux file names
- Host: GitHub
- URL: https://github.com/bulletmark/rename-clean
- Owner: bulletmark
- Created: 2025-08-14T05:27:35.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2025-09-08T00:25:11.000Z (29 days ago)
- Last Synced: 2025-09-08T02:32:12.175Z (29 days ago)
- Topics: rename, rename-files, rename-files-and-directories
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## RENAME-CLEAN - Replace Undesirable Characters in Linux File Names
[](https://pypi.org/project/rename-clean/)The [`rename-clean`][rename-clean] command line utility replaces undesirable
characters with underscores in Linux file names. Undesirable characters are any
that are not ASCII alphanumeric (`0-9`, `a-z`, `A-Z`), underscore (`_`), hyphen
(`-`), or dot (`.`). If characters are replaced, then repeated underscores are
also reduced to a single underscore and trimmed from the name stem and suffix.
A unique name is always created by appending a number on the name stem if
necessary.I use it after downloading an archive of files from the internet such as a
torrent to remove spaces, emojis, and other odd characters from the file names.Example usage follows:
Clean up all file and directory names in the current directory:
```sh
$ rename-clean (or rename-clean .)
```Clean up all file and directory names in the current directory and recursively
under any child directories:```sh
$ rename-clean -r
```Clean up all all jpeg file names in current directory:
```sh
$ rename-clean *.jpg
```Read a list of names to be cleaned up from a file:
```sh
$ rename-clean - for more details.[rename-clean]: https://github.com/bulletmark/rename-clean
[uvtool]: https://docs.astral.sh/uv/guides/tools/#installing-tools
[uvx]: https://docs.astral.sh/uv/guides/tools/#running-tools