move-to-range-cli
v1.0.1
Published
Move files to corresponding directories given a range.
Downloads
1
Maintainers
Readme
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 <int>-<int> <file-type>
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 to set up an alias on Windows.
UNIX
alias mdr=make-dir-range
Related
- move-to-range - API for this module
- copy-to-range-cli - Copy a file to a range of directories
- make-dir-range-cli - Make directories from a range of integers
Authors
- Austin Gordon - Development - GitHub
License
This project is licensed under the MIT License - see the LICENSE file for details