Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simonwep/cleanup-files
๐งผ Small utilities to cleanup directories such as download which are all the time full of random stuff.
https://github.com/simonwep/cleanup-files
cleanup-script exe executable scripts-cli tool util utility utility-application
Last synced: 20 days ago
JSON representation
๐งผ Small utilities to cleanup directories such as download which are all the time full of random stuff.
- Host: GitHub
- URL: https://github.com/simonwep/cleanup-files
- Owner: simonwep
- License: mit
- Created: 2020-02-01T17:14:45.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-15T15:05:55.000Z (over 3 years ago)
- Last Synced: 2024-10-06T10:44:12.726Z (about 1 month ago)
- Topics: cleanup-script, exe, executable, scripts-cli, tool, util, utility, utility-application
- Language: Rust
- Homepage:
- Size: 76.2 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Quickly clean up chaos### Usage
> Disclaimer:
> This project was intended to check out rust and learn its concepts and principles. The code is kept simple and I've re-invented a lot
> to learn how it works (I'm aware of libraries such as [`clap`](https://github.com/clap-rs/clap) and [`structop`](https://github.com/TeXitoi/structopt) to build CLIs)You can find the latest release [here](releases), keep in mind that some commands may not exist in older versions.
```bash
$ ./cleanup -h
``````
Usage: cleanup [options...]Flags:
-d, --dry, --dry-run Performs a dry-run, e.g. nothing get's moved.
-h, --help Prints this help text.
-v, --version Prints the current version.Arguments:
-l, --log-file Creates (or disables) a log-file in the target folder. Default is 'c
leanup.log'.
-i, --include Move only files with one of the following extensions.
-e, --exclude Exclude certain files by their extension.Values:
Source directory. Default is the current directory.
Target directory (Default is source + .archive).
```### Examples
| Command | Explanation |
| ------- | ----------- |
| `./cleanup` | This will create a new `./.archive` in the current director and move all files (except these which start with a dot and the executable itself) into `.archive/[extension]/[file].[extension]`. |
| `./cleanup . etc` | It'll still use the current dir as source (`.`) but will move the files into `./etc` instead of `./.archive`.|
| `./cleanup -l --ext mp3,iso` | A `cleanup.log` file will be created inside of `./.archive` with information about what has been moved. Files with the exension `mp3` and `iso` are ignored and won't get moved. |
| `./cleanup ../ ./bam --log-file ../my-log.txt` | Grabs file from the parent-directory and moves them into `./bam` (the current directory). The log-file will be create in the _
current_ directory and is this time `my-log.txt`. |### Building
This project is written in [rust](https://www.rust-lang.org), clone it via git:
```bash
$ git clone https://github.com/Simonwep/cleanup-files
```Afterwards you can either run `cargo build` or `cargo test` to test the project.