xtend is a simple tool to help add or remove file extensions.
I started this tool because I needed to change the file extension for certain files, so that another tool stops detecting them when I needed to test something and restore the old extension when I'm done.
This is relatively simple for single files, but if you need many of them it gets a bit more tricky. There are plain unix ways to do it, but those are hard to remember and more error prone.
With this tool I can just do something like this: ```sh
xtend toggle bak test.txt
``
and if the file is named
test.txtit will get renamed to
test.txt.bak,
if it's named
test.txt.bakinstead, it will get renamed to
test.txt`.
From binary release: https://github.com/hardliner66/xtend/releases
With cargo:
sh
cargo install xtend
```sh xtend command line helper to work with file extensions
USAGE:
xtend
OPTIONS: -h, --help Print help information -V, --version Print version information
SUBCOMMANDS: add Adds an extension to all found files help Print this message or the help of the given subcommand(s) remove Removes an extension from all found files set Replaces the extension with the given one toggle Adds an extension when it's missing or removes it when it's present toggle-between Toggles between two extensions
```
```sh xtend-add Adds an extension to all found files
USAGE:
xtend add
ARGS:
OPTIONS: -h, --help Print help information ```
```sh xtend-set Replaces the extension with the given one
USAGE:
xtend set
ARGS:
OPTIONS: -h, --help Print help information ```
```sh xtend-remove Removes an extension from all found files
USAGE: xtend remove [ARGS]
ARGS:
OPTIONS: -h, --help Print help information ```
```sh xtend-toggle Adds an extension when it's missing or removes it when it's present
USAGE:
xtend toggle
ARGS:
OPTIONS: -h, --help Print help information ```
```sh xtend-toggle-between Toggles between two extensions
USAGE:
xtend toggle-between
ARGS:
OPTIONS: -h, --help Print help information ```