make-dir-range
v1.0.3
Published
Make directories from ranges of integers.
Downloads
7
Maintainers
Readme
make-dir-range
Make directories from ranges of integers.
Installation
npm install --save make-dir-range
Usage
const makeDirRange = require('make-dir-range');
makeDirRange('1-3,5,9-10');
$ tree
.
├── 1
├── 2
├── 3
├── 5
├── 9
├── 10
│ ...
With options:
const makeDirRange = require('make-dir-range');
makeDirRange('11-13,15', {
destination: 'out',
append: 'a',
prepend: 'p'
});
$ tree
.
├── out
│ ├── p11a
│ ├── p12a
│ ├── p13a
│ └── p15a
│ ...
Options
Property | Description | Default
--- | --- | ---
destination | Destination directory | ""
append | String to append to directory names | ""
prepend | String to prepend to directory names | ""
Related
- make-dir-range-cli - CLI for this module
- copy-to-range - Copy a file to a range of directories
- move-to-range - Move files to corresponding directories given a range
Authors
- Austin Gordon - Development - GitHub
License
This project is licensed under the MIT License - see the LICENSE file for details