https://github.com/theawiteb/frenamer
Rename and unrename all files in the directory, alphabetically or randomly
https://github.com/theawiteb/frenamer
rename rename-files
Last synced: 6 months ago
JSON representation
Rename and unrename all files in the directory, alphabetically or randomly
- Host: GitHub
- URL: https://github.com/theawiteb/frenamer
- Owner: TheAwiteb
- License: mit
- Created: 2021-11-25T21:28:28.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-01-08T20:18:21.000Z (almost 4 years ago)
- Last Synced: 2025-03-14T00:36:08.995Z (7 months ago)
- Topics: rename, rename-files
- Language: Python
- Homepage:
- Size: 20.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Table of Contents
## Requirements
* [Python](https://Python.org/) >= 3.8
## Installation
### PyPi
```bash
$ pip3 install frenamer
```### GitHub
```bash
$ git clone https://github.com/TheAwiteb/frenamer/
$ cd frenamer
$ sudo python3 setup.py install
```### Update
```bash
$ python3 -m pip install frenamer --upgrade
```## Note
> if `frenamer --help` don't work with you use `python3 -m frenamer --help` or `py -m frenamer --help` for windows## Usage
### Help message
```
Usage: frenamer [OPTIONS] COMMAND [ARGS]...Frenamer (File-Renamer) Tool help you to rename files and directories
alphabetical or random namesOptions:
-V, --version Frenamer (File-Renamer) version.
--help Show this message and exit.Commands:
rename Rename directories with random names or alphabetical order.
unrename unrename directories, fetching old names from json files.
```### Rename
#### Help message
```
Usage: frenamer rename [OPTIONS] DIRECTORIES...Rename directories with random names or alphabetical order.
Arguments:
DIRECTORIES... Directories whose contents you want to rename. [required]Options:
-r, --random Rename with random names, or alphabetically.
-l, --length INTEGER Random name length. [default: 10]
-s, --save-date Save directory names before and after renaming.
-f, --filename TEXT The name of the json file in which the directory names
are to be saved. [default: rename_data.json]
--help Show this message and exit.```
#### Alphabetically
```bash
$ frenamer rename
$ frenamer rename --save-date
$ frenamer rename --save-date --filename data.json
```#### Randomly
```bash
$ frenamer rename --random
$ frenamer rename --random --length 15
```### Unrename
#### Help message
```
Usage: frenamer unrename [OPTIONS] DIRECTORIES...unrename directories, fetching old names from json files.
Arguments:
DIRECTORIES... Directories whose contents you want to unrename. [required]Options:
-d, --delete Delete the JSON files that were used in the unrenaming
after completion.
-f, --filename TEXT The name of the json file from which the directory
names will be extracted. [default: rename_data.json]
--help Show this message and exit.```
```bash
$ frenamer unrename
$ frenamer unrename --filename data.json
$ frenamer unrename --delete
```## Discussions
Question, feature request, discuss about frenamer [here](https://github.com/TheAwiteb/frenamer/discussions)## Issues
You can report a bug [here](https://github.com/TheAwiteb/frenamer/issues)## License
The MIT License (MIT). Please see [License File](LICENSE) for more information.