Move files to corresponding directories given a range
npm install --save move-to-range
const moveToRange = require('move-to-range');
moveToRange('1-4', '.txt');
$ tree
.
├── 1.txt
├── 2.txt
├── 3.txt
├── 4.txt
├── 1
│ └── 1.txt
├── 2
│ └── 2.txt
├── 3
│ └── 3.txt
├── 4
│ └── 4.txt
│ ...
With options:
const moveToRange = require('move-to-range');
moveToRange('1-4', '.txt', {
destination: 'out'
});
$ tree
.
├── 1.txt
├── 2.txt
├── 3.txt
├── 4.txt
├── out
│ ├── 1
│ │ └── 1.txt
│ ├── 2
│ │ └── 2.txt
│ ├── 3
│ │ └── 3.txt
│ └── 4
│ └── 4.txt
│ ...
Property | Description | Default |
---|---|---|
destination | Destination directory | "" |
- move-to-range-cli - CLI for this module
- copy-to-range - Copy a file to a range of directories
- make-dir-range - Make directories from a range of integers
- Austin Gordon - Development - GitHub
This project is licensed under the MIT License - see the LICENSE file for details