https://github.com/hutsoninc/move-to-range-cli
Move files to corresponding directories given a range.
https://github.com/hutsoninc/move-to-range-cli
dir directory file files integer move mv range
Last synced: 2 months ago
JSON representation
Move files to corresponding directories given a range.
- Host: GitHub
- URL: https://github.com/hutsoninc/move-to-range-cli
- Owner: hutsoninc
- License: mit
- Created: 2018-11-08T16:30:49.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-26T21:39:45.000Z (about 7 years ago)
- Last Synced: 2025-01-27T11:32:56.004Z (12 months ago)
- Topics: dir, directory, file, files, integer, move, mv, range
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# move-to-range-cli
[](https://www.npmjs.com/package/move-to-range-cli)
Move files to corresponding directories given a range.
## Installation
`npm install --global move-to-range-cli`
## Usage
```
$ move-to-range --help
Move files to a range of directories.
Usage
$ move-to-range -
Options
--destination, -d Destination for dirs
Example
$ move-to-range 1-5,7,9-10 .txt
```
```
$ tree
.
├── 1.txt
├── 2.txt
├── 3.txt
├── 5.txt
├── 1
├── 2
├── 3
├── 5
│ ...
$ move-to-range 1-3,5 .txt
# tree
.
├── 1
│ └── 1.txt
├── 2
│ └── 2.txt
├── 3
│ └── 3.txt
├── 5
│ └── 5.txt
│ ...
```
### With options:
```
$ tree
.
├── 1.txt
├── 2.txt
├── 3.txt
├── 5.txt
├── out
│ ├── 1
│ ├── 2
│ ├── 3
│ └── 5
│ ...
$ move-to-range 1-3,5 .txt --destination out
$ tree
.
├── out
│ ├── 1
│ │ └── 1.txt
│ ├── 2
│ │ └── 2.txt
│ ├── 3
│ │ └── 3.txt
│ └── 5
│ └── 5.txt
│ ...
```
## Command Line/Shell Alias
### Windows
Follow the instructions on [this Stack Overflow answer](https://stackoverflow.com/a/21040825/8268314) to set up an alias on Windows.
### UNIX
```
alias mdr=make-dir-range
```
## Related
- [move-to-range](https://github.com/hutsoninc/move-to-range) - API for this module
- [copy-to-range-cli](https://github.com/hutsoninc/copy-to-range-cli) - Copy a file to a range of directories
- [make-dir-range-cli](https://github.com/hutsoninc/make-dir-range-cli) - Make directories from a range of integers
## Authors
* **Austin Gordon** - *Development* - [GitHub](https://github.com/AustinLeeGordon)
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details